tabby-mcp-server 1.5.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -1
- package/dist/index.js +1276 -414
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/typings/components/mcpSettingsTab.component.d.ts +2 -1
- package/typings/index.d.ts +7 -1
- package/typings/services/mcpConfigProvider.d.ts +5 -0
- package/typings/services/mcpService.d.ts +8 -0
- package/typings/tools/tabManagement.d.ts +5 -0
- package/typings/tools/terminal.d.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -197,6 +197,17 @@ var requestPrototype = {
|
|
|
197
197
|
}
|
|
198
198
|
});
|
|
199
199
|
});
|
|
200
|
+
Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
201
|
+
value: function(depth, options, inspectFn) {
|
|
202
|
+
const props = {
|
|
203
|
+
method: this.method,
|
|
204
|
+
url: this.url,
|
|
205
|
+
headers: this.headers,
|
|
206
|
+
nativeRequest: this[requestCache]
|
|
207
|
+
};
|
|
208
|
+
return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
209
|
+
}
|
|
210
|
+
});
|
|
200
211
|
Object.setPrototypeOf(requestPrototype, Request.prototype);
|
|
201
212
|
var newRequest = (incoming, defaultHostname) => {
|
|
202
213
|
const req = Object.create(requestPrototype);
|
|
@@ -303,6 +314,17 @@ var Response2 = class _Response {
|
|
|
303
314
|
}
|
|
304
315
|
});
|
|
305
316
|
});
|
|
317
|
+
Object.defineProperty(Response2.prototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
318
|
+
value: function(depth, options, inspectFn) {
|
|
319
|
+
const props = {
|
|
320
|
+
status: this.status,
|
|
321
|
+
headers: this.headers,
|
|
322
|
+
ok: this.ok,
|
|
323
|
+
nativeResponse: this[responseCache]
|
|
324
|
+
};
|
|
325
|
+
return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
326
|
+
}
|
|
327
|
+
});
|
|
306
328
|
Object.setPrototypeOf(Response2, GlobalResponse);
|
|
307
329
|
Object.setPrototypeOf(Response2.prototype, GlobalResponse.prototype);
|
|
308
330
|
|
|
@@ -942,8 +964,9 @@ function validMime (type) {
|
|
|
942
964
|
(__unused_webpack_module, exports) {
|
|
943
965
|
|
|
944
966
|
"use strict";
|
|
967
|
+
var __webpack_unused_export__;
|
|
945
968
|
|
|
946
|
-
|
|
969
|
+
__webpack_unused_export__ = ({ value: true });
|
|
947
970
|
exports.formatNames = exports.fastFormats = exports.fullFormats = void 0;
|
|
948
971
|
function fmtDef(validate, compare) {
|
|
949
972
|
return { validate, compare };
|
|
@@ -1201,9 +1224,10 @@ exports["default"] = formatsPlugin;
|
|
|
1201
1224
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1202
1225
|
|
|
1203
1226
|
"use strict";
|
|
1227
|
+
var __webpack_unused_export__;
|
|
1204
1228
|
|
|
1205
|
-
|
|
1206
|
-
exports.
|
|
1229
|
+
__webpack_unused_export__ = ({ value: true });
|
|
1230
|
+
exports.A = void 0;
|
|
1207
1231
|
const ajv_1 = __webpack_require__(3282);
|
|
1208
1232
|
const codegen_1 = __webpack_require__(1410);
|
|
1209
1233
|
const ops = codegen_1.operators;
|
|
@@ -1217,7 +1241,7 @@ const error = {
|
|
|
1217
1241
|
message: ({ keyword, schemaCode }) => (0, codegen_1.str) `should be ${KWDs[keyword].okStr} ${schemaCode}`,
|
|
1218
1242
|
params: ({ keyword, schemaCode }) => (0, codegen_1._) `{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`,
|
|
1219
1243
|
};
|
|
1220
|
-
exports.
|
|
1244
|
+
exports.A = {
|
|
1221
1245
|
keyword: Object.keys(KWDs),
|
|
1222
1246
|
type: "string",
|
|
1223
1247
|
schemaType: "string",
|
|
@@ -1265,7 +1289,7 @@ exports.formatLimitDefinition = {
|
|
|
1265
1289
|
dependencies: ["format"],
|
|
1266
1290
|
};
|
|
1267
1291
|
const formatLimitPlugin = (ajv) => {
|
|
1268
|
-
ajv.addKeyword(exports.
|
|
1292
|
+
ajv.addKeyword(exports.A);
|
|
1269
1293
|
return ajv;
|
|
1270
1294
|
};
|
|
1271
1295
|
exports["default"] = formatLimitPlugin;
|
|
@@ -2351,13 +2375,14 @@ exports.ValueScope = ValueScope;
|
|
|
2351
2375
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2352
2376
|
|
|
2353
2377
|
"use strict";
|
|
2378
|
+
var __webpack_unused_export__;
|
|
2354
2379
|
|
|
2355
|
-
|
|
2356
|
-
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.
|
|
2380
|
+
__webpack_unused_export__ = ({ value: true });
|
|
2381
|
+
exports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.y = void 0;
|
|
2357
2382
|
const codegen_1 = __webpack_require__(1410);
|
|
2358
2383
|
const util_1 = __webpack_require__(4227);
|
|
2359
2384
|
const names_1 = __webpack_require__(2023);
|
|
2360
|
-
exports.
|
|
2385
|
+
exports.y = {
|
|
2361
2386
|
message: ({ keyword }) => (0, codegen_1.str) `must pass "${keyword}" keyword validation`,
|
|
2362
2387
|
};
|
|
2363
2388
|
exports.keyword$DataError = {
|
|
@@ -2365,7 +2390,7 @@ exports.keyword$DataError = {
|
|
|
2365
2390
|
? (0, codegen_1.str) `"${keyword}" keyword must be ${schemaType} ($data)`
|
|
2366
2391
|
: (0, codegen_1.str) `"${keyword}" keyword is invalid ($data)`,
|
|
2367
2392
|
};
|
|
2368
|
-
function reportError(cxt, error = exports.
|
|
2393
|
+
function reportError(cxt, error = exports.y, errorPaths, overrideAllErrors) {
|
|
2369
2394
|
const { it } = cxt;
|
|
2370
2395
|
const { gen, compositeRule, allErrors } = it;
|
|
2371
2396
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -2377,7 +2402,7 @@ function reportError(cxt, error = exports.keywordError, errorPaths, overrideAllE
|
|
|
2377
2402
|
}
|
|
2378
2403
|
}
|
|
2379
2404
|
exports.reportError = reportError;
|
|
2380
|
-
function reportExtraError(cxt, error = exports.
|
|
2405
|
+
function reportExtraError(cxt, error = exports.y, errorPaths) {
|
|
2381
2406
|
const { it } = cxt;
|
|
2382
2407
|
const { gen, compositeRule, allErrors } = it;
|
|
2383
2408
|
const errObj = errorObjectCode(cxt, error, errorPaths);
|
|
@@ -2481,9 +2506,10 @@ function extraErrorProps(cxt, { params, message }, keyValues) {
|
|
|
2481
2506
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2482
2507
|
|
|
2483
2508
|
"use strict";
|
|
2509
|
+
var __webpack_unused_export__;
|
|
2484
2510
|
|
|
2485
|
-
|
|
2486
|
-
exports.resolveSchema =
|
|
2511
|
+
__webpack_unused_export__ = ({ value: true });
|
|
2512
|
+
exports.resolveSchema = __webpack_unused_export__ = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;
|
|
2487
2513
|
const codegen_1 = __webpack_require__(1410);
|
|
2488
2514
|
const validation_error_1 = __webpack_require__(3558);
|
|
2489
2515
|
const names_1 = __webpack_require__(2023);
|
|
@@ -2637,7 +2663,7 @@ function getCompilingSchema(schEnv) {
|
|
|
2637
2663
|
return sch;
|
|
2638
2664
|
}
|
|
2639
2665
|
}
|
|
2640
|
-
|
|
2666
|
+
__webpack_unused_export__ = getCompilingSchema;
|
|
2641
2667
|
function sameSchemaEnv(s1, s2) {
|
|
2642
2668
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
2643
2669
|
}
|
|
@@ -2730,8 +2756,9 @@ function getJsonPointer(parsedRef, { baseId, schema, root }) {
|
|
|
2730
2756
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2731
2757
|
|
|
2732
2758
|
"use strict";
|
|
2759
|
+
var __webpack_unused_export__;
|
|
2733
2760
|
|
|
2734
|
-
|
|
2761
|
+
__webpack_unused_export__ = ({ value: true });
|
|
2735
2762
|
const codegen_1 = __webpack_require__(1410);
|
|
2736
2763
|
const names = {
|
|
2737
2764
|
// validation function arguments
|
|
@@ -2784,8 +2811,9 @@ exports["default"] = MissingRefError;
|
|
|
2784
2811
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2785
2812
|
|
|
2786
2813
|
"use strict";
|
|
2814
|
+
var __webpack_unused_export__;
|
|
2787
2815
|
|
|
2788
|
-
|
|
2816
|
+
__webpack_unused_export__ = ({ value: true });
|
|
2789
2817
|
exports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;
|
|
2790
2818
|
const util_1 = __webpack_require__(4227);
|
|
2791
2819
|
const equal = __webpack_require__(4398);
|
|
@@ -2946,8 +2974,9 @@ exports.getSchemaRefs = getSchemaRefs;
|
|
|
2946
2974
|
(__unused_webpack_module, exports) {
|
|
2947
2975
|
|
|
2948
2976
|
"use strict";
|
|
2977
|
+
var __webpack_unused_export__;
|
|
2949
2978
|
|
|
2950
|
-
|
|
2979
|
+
__webpack_unused_export__ = ({ value: true });
|
|
2951
2980
|
exports.getRules = exports.isJSONType = void 0;
|
|
2952
2981
|
const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"];
|
|
2953
2982
|
const jsonTypes = new Set(_jsonTypes);
|
|
@@ -2979,9 +3008,10 @@ exports.getRules = getRules;
|
|
|
2979
3008
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2980
3009
|
|
|
2981
3010
|
"use strict";
|
|
3011
|
+
var __webpack_unused_export__;
|
|
2982
3012
|
|
|
2983
|
-
|
|
2984
|
-
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc =
|
|
3013
|
+
__webpack_unused_export__ = ({ value: true });
|
|
3014
|
+
exports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = __webpack_unused_export__ = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = __webpack_unused_export__ = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = __webpack_unused_export__ = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;
|
|
2985
3015
|
const codegen_1 = __webpack_require__(1410);
|
|
2986
3016
|
const code_1 = __webpack_require__(1520);
|
|
2987
3017
|
// TODO refactor to use Set
|
|
@@ -3022,7 +3052,7 @@ function schemaHasRules(schema, rules) {
|
|
|
3022
3052
|
return true;
|
|
3023
3053
|
return false;
|
|
3024
3054
|
}
|
|
3025
|
-
|
|
3055
|
+
__webpack_unused_export__ = schemaHasRules;
|
|
3026
3056
|
function schemaHasRulesButRef(schema, RULES) {
|
|
3027
3057
|
if (typeof schema == "boolean")
|
|
3028
3058
|
return !schema;
|
|
@@ -3055,7 +3085,7 @@ function escapeJsonPointer(str) {
|
|
|
3055
3085
|
return `${str}`;
|
|
3056
3086
|
return str.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
3057
3087
|
}
|
|
3058
|
-
|
|
3088
|
+
__webpack_unused_export__ = escapeJsonPointer;
|
|
3059
3089
|
function unescapeJsonPointer(str) {
|
|
3060
3090
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
3061
3091
|
}
|
|
@@ -3118,7 +3148,7 @@ exports.evaluatedPropsToName = evaluatedPropsToName;
|
|
|
3118
3148
|
function setEvaluated(gen, props, ps) {
|
|
3119
3149
|
Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._) `${props}${(0, codegen_1.getProperty)(p)}`, true));
|
|
3120
3150
|
}
|
|
3121
|
-
|
|
3151
|
+
__webpack_unused_export__ = setEvaluated;
|
|
3122
3152
|
const snippets = {};
|
|
3123
3153
|
function useFunc(gen, f) {
|
|
3124
3154
|
return gen.scopeValue("func", {
|
|
@@ -3164,8 +3194,9 @@ exports.checkStrictMode = checkStrictMode;
|
|
|
3164
3194
|
(__unused_webpack_module, exports) {
|
|
3165
3195
|
|
|
3166
3196
|
"use strict";
|
|
3197
|
+
var __webpack_unused_export__;
|
|
3167
3198
|
|
|
3168
|
-
|
|
3199
|
+
__webpack_unused_export__ = ({ value: true });
|
|
3169
3200
|
exports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;
|
|
3170
3201
|
function schemaHasRulesForType({ schema, self }, type) {
|
|
3171
3202
|
const group = self.RULES.types[type];
|
|
@@ -3190,8 +3221,9 @@ exports.shouldUseRule = shouldUseRule;
|
|
|
3190
3221
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3191
3222
|
|
|
3192
3223
|
"use strict";
|
|
3224
|
+
var __webpack_unused_export__;
|
|
3193
3225
|
|
|
3194
|
-
|
|
3226
|
+
__webpack_unused_export__ = ({ value: true });
|
|
3195
3227
|
exports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;
|
|
3196
3228
|
const errors_1 = __webpack_require__(8708);
|
|
3197
3229
|
const codegen_1 = __webpack_require__(1410);
|
|
@@ -3247,8 +3279,9 @@ function falseSchemaError(it, overrideAllErrors) {
|
|
|
3247
3279
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3248
3280
|
|
|
3249
3281
|
"use strict";
|
|
3282
|
+
var __webpack_unused_export__;
|
|
3250
3283
|
|
|
3251
|
-
|
|
3284
|
+
__webpack_unused_export__ = ({ value: true });
|
|
3252
3285
|
exports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;
|
|
3253
3286
|
const rules_1 = __webpack_require__(396);
|
|
3254
3287
|
const applicability_1 = __webpack_require__(7887);
|
|
@@ -3457,8 +3490,9 @@ function getTypeErrorContext(it) {
|
|
|
3457
3490
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
3458
3491
|
|
|
3459
3492
|
"use strict";
|
|
3493
|
+
var __webpack_unused_export__;
|
|
3460
3494
|
|
|
3461
|
-
|
|
3495
|
+
__webpack_unused_export__ = ({ value: true });
|
|
3462
3496
|
exports.assignDefaults = void 0;
|
|
3463
3497
|
const codegen_1 = __webpack_require__(1410);
|
|
3464
3498
|
const util_1 = __webpack_require__(4227);
|
|
@@ -4026,8 +4060,9 @@ exports.getData = getData;
|
|
|
4026
4060
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4027
4061
|
|
|
4028
4062
|
"use strict";
|
|
4063
|
+
var __webpack_unused_export__;
|
|
4029
4064
|
|
|
4030
|
-
|
|
4065
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4031
4066
|
exports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;
|
|
4032
4067
|
const codegen_1 = __webpack_require__(1410);
|
|
4033
4068
|
const names_1 = __webpack_require__(2023);
|
|
@@ -4157,8 +4192,9 @@ exports.validateKeywordUsage = validateKeywordUsage;
|
|
|
4157
4192
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4158
4193
|
|
|
4159
4194
|
"use strict";
|
|
4195
|
+
var __webpack_unused_export__;
|
|
4160
4196
|
|
|
4161
|
-
|
|
4197
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4162
4198
|
exports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;
|
|
4163
4199
|
const codegen_1 = __webpack_require__(1410);
|
|
4164
4200
|
const util_1 = __webpack_require__(4227);
|
|
@@ -4245,18 +4281,19 @@ exports.extendSubschemaMode = extendSubschemaMode;
|
|
|
4245
4281
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4246
4282
|
|
|
4247
4283
|
"use strict";
|
|
4284
|
+
var __webpack_unused_export__;
|
|
4248
4285
|
|
|
4249
|
-
|
|
4250
|
-
|
|
4286
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4287
|
+
__webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = __webpack_unused_export__ = void 0;
|
|
4251
4288
|
var validate_1 = __webpack_require__(2586);
|
|
4252
|
-
|
|
4289
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return validate_1.KeywordCxt; } });
|
|
4253
4290
|
var codegen_1 = __webpack_require__(1410);
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4291
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return codegen_1._; } });
|
|
4292
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return codegen_1.str; } });
|
|
4293
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return codegen_1.stringify; } });
|
|
4294
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return codegen_1.nil; } });
|
|
4295
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return codegen_1.Name; } });
|
|
4296
|
+
__webpack_unused_export__ = ({ enumerable: true, get: function () { return codegen_1.CodeGen; } });
|
|
4260
4297
|
const validation_error_1 = __webpack_require__(3558);
|
|
4261
4298
|
const ref_error_1 = __webpack_require__(4551);
|
|
4262
4299
|
const rules_1 = __webpack_require__(396);
|
|
@@ -4341,7 +4378,7 @@ class Ajv {
|
|
|
4341
4378
|
constructor(opts = {}) {
|
|
4342
4379
|
this.schemas = {};
|
|
4343
4380
|
this.refs = {};
|
|
4344
|
-
this.formats =
|
|
4381
|
+
this.formats = Object.create(null);
|
|
4345
4382
|
this._compilations = new Set();
|
|
4346
4383
|
this._loading = {};
|
|
4347
4384
|
this._cache = new Map();
|
|
@@ -4870,8 +4907,9 @@ function schemaOrData(schema) {
|
|
|
4870
4907
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4871
4908
|
|
|
4872
4909
|
"use strict";
|
|
4910
|
+
var __webpack_unused_export__;
|
|
4873
4911
|
|
|
4874
|
-
|
|
4912
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4875
4913
|
// https://github.com/ajv-validator/ajv/issues/889
|
|
4876
4914
|
const equal = __webpack_require__(4398);
|
|
4877
4915
|
equal.code = 'require("ajv/dist/runtime/equal").default';
|
|
@@ -4884,8 +4922,9 @@ exports["default"] = equal;
|
|
|
4884
4922
|
(__unused_webpack_module, exports) {
|
|
4885
4923
|
|
|
4886
4924
|
"use strict";
|
|
4925
|
+
var __webpack_unused_export__;
|
|
4887
4926
|
|
|
4888
|
-
|
|
4927
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4889
4928
|
// https://mathiasbynens.be/notes/javascript-encoding
|
|
4890
4929
|
// https://github.com/bestiejs/punycode.js - punycode.ucs2.decode
|
|
4891
4930
|
function ucs2length(str) {
|
|
@@ -4915,8 +4954,9 @@ ucs2length.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
|
4915
4954
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4916
4955
|
|
|
4917
4956
|
"use strict";
|
|
4957
|
+
var __webpack_unused_export__;
|
|
4918
4958
|
|
|
4919
|
-
|
|
4959
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4920
4960
|
const uri = __webpack_require__(8343);
|
|
4921
4961
|
uri.code = 'require("ajv/dist/runtime/uri").default';
|
|
4922
4962
|
exports["default"] = uri;
|
|
@@ -4946,8 +4986,9 @@ exports["default"] = ValidationError;
|
|
|
4946
4986
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
4947
4987
|
|
|
4948
4988
|
"use strict";
|
|
4989
|
+
var __webpack_unused_export__;
|
|
4949
4990
|
|
|
4950
|
-
|
|
4991
|
+
__webpack_unused_export__ = ({ value: true });
|
|
4951
4992
|
exports.validateAdditionalItems = void 0;
|
|
4952
4993
|
const codegen_1 = __webpack_require__(1410);
|
|
4953
4994
|
const util_1 = __webpack_require__(4227);
|
|
@@ -5002,8 +5043,9 @@ exports["default"] = def;
|
|
|
5002
5043
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5003
5044
|
|
|
5004
5045
|
"use strict";
|
|
5046
|
+
var __webpack_unused_export__;
|
|
5005
5047
|
|
|
5006
|
-
|
|
5048
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5007
5049
|
const code_1 = __webpack_require__(5765);
|
|
5008
5050
|
const codegen_1 = __webpack_require__(1410);
|
|
5009
5051
|
const names_1 = __webpack_require__(2023);
|
|
@@ -5115,8 +5157,9 @@ exports["default"] = def;
|
|
|
5115
5157
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5116
5158
|
|
|
5117
5159
|
"use strict";
|
|
5160
|
+
var __webpack_unused_export__;
|
|
5118
5161
|
|
|
5119
|
-
|
|
5162
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5120
5163
|
const util_1 = __webpack_require__(4227);
|
|
5121
5164
|
const def = {
|
|
5122
5165
|
keyword: "allOf",
|
|
@@ -5145,8 +5188,9 @@ exports["default"] = def;
|
|
|
5145
5188
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5146
5189
|
|
|
5147
5190
|
"use strict";
|
|
5191
|
+
var __webpack_unused_export__;
|
|
5148
5192
|
|
|
5149
|
-
|
|
5193
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5150
5194
|
const code_1 = __webpack_require__(5765);
|
|
5151
5195
|
const def = {
|
|
5152
5196
|
keyword: "anyOf",
|
|
@@ -5164,8 +5208,9 @@ exports["default"] = def;
|
|
|
5164
5208
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5165
5209
|
|
|
5166
5210
|
"use strict";
|
|
5211
|
+
var __webpack_unused_export__;
|
|
5167
5212
|
|
|
5168
|
-
|
|
5213
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5169
5214
|
const codegen_1 = __webpack_require__(1410);
|
|
5170
5215
|
const util_1 = __webpack_require__(4227);
|
|
5171
5216
|
const error = {
|
|
@@ -5266,13 +5311,14 @@ exports["default"] = def;
|
|
|
5266
5311
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5267
5312
|
|
|
5268
5313
|
"use strict";
|
|
5314
|
+
var __webpack_unused_export__;
|
|
5269
5315
|
|
|
5270
|
-
|
|
5271
|
-
|
|
5316
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5317
|
+
__webpack_unused_export__ = __webpack_unused_export__ = exports.z3 = void 0;
|
|
5272
5318
|
const codegen_1 = __webpack_require__(1410);
|
|
5273
5319
|
const util_1 = __webpack_require__(4227);
|
|
5274
5320
|
const code_1 = __webpack_require__(5765);
|
|
5275
|
-
exports.
|
|
5321
|
+
exports.z3 = {
|
|
5276
5322
|
message: ({ params: { property, depsCount, deps } }) => {
|
|
5277
5323
|
const property_ies = depsCount === 1 ? "property" : "properties";
|
|
5278
5324
|
return (0, codegen_1.str) `must have ${property_ies} ${deps} when property ${property} is present`;
|
|
@@ -5286,7 +5332,7 @@ const def = {
|
|
|
5286
5332
|
keyword: "dependencies",
|
|
5287
5333
|
type: "object",
|
|
5288
5334
|
schemaType: "object",
|
|
5289
|
-
error: exports.
|
|
5335
|
+
error: exports.z3,
|
|
5290
5336
|
code(cxt) {
|
|
5291
5337
|
const [propDeps, schDeps] = splitDependencies(cxt);
|
|
5292
5338
|
validatePropertyDeps(cxt, propDeps);
|
|
@@ -5333,7 +5379,7 @@ function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
|
|
|
5333
5379
|
}
|
|
5334
5380
|
}
|
|
5335
5381
|
}
|
|
5336
|
-
|
|
5382
|
+
__webpack_unused_export__ = validatePropertyDeps;
|
|
5337
5383
|
function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
5338
5384
|
const { gen, data, keyword, it } = cxt;
|
|
5339
5385
|
const valid = gen.name("valid");
|
|
@@ -5348,7 +5394,7 @@ function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
|
|
|
5348
5394
|
cxt.ok(valid);
|
|
5349
5395
|
}
|
|
5350
5396
|
}
|
|
5351
|
-
|
|
5397
|
+
__webpack_unused_export__ = validateSchemaDeps;
|
|
5352
5398
|
exports["default"] = def;
|
|
5353
5399
|
//# sourceMappingURL=dependencies.js.map
|
|
5354
5400
|
|
|
@@ -5358,8 +5404,9 @@ exports["default"] = def;
|
|
|
5358
5404
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5359
5405
|
|
|
5360
5406
|
"use strict";
|
|
5407
|
+
var __webpack_unused_export__;
|
|
5361
5408
|
|
|
5362
|
-
|
|
5409
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5363
5410
|
const codegen_1 = __webpack_require__(1410);
|
|
5364
5411
|
const util_1 = __webpack_require__(4227);
|
|
5365
5412
|
const error = {
|
|
@@ -5431,8 +5478,9 @@ exports["default"] = def;
|
|
|
5431
5478
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5432
5479
|
|
|
5433
5480
|
"use strict";
|
|
5481
|
+
var __webpack_unused_export__;
|
|
5434
5482
|
|
|
5435
|
-
|
|
5483
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5436
5484
|
const additionalItems_1 = __webpack_require__(5457);
|
|
5437
5485
|
const prefixItems_1 = __webpack_require__(5354);
|
|
5438
5486
|
const items_1 = __webpack_require__(494);
|
|
@@ -5482,8 +5530,9 @@ exports["default"] = getApplicator;
|
|
|
5482
5530
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5483
5531
|
|
|
5484
5532
|
"use strict";
|
|
5533
|
+
var __webpack_unused_export__;
|
|
5485
5534
|
|
|
5486
|
-
|
|
5535
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5487
5536
|
exports.validateTuple = void 0;
|
|
5488
5537
|
const codegen_1 = __webpack_require__(1410);
|
|
5489
5538
|
const util_1 = __webpack_require__(4227);
|
|
@@ -5541,8 +5590,9 @@ exports["default"] = def;
|
|
|
5541
5590
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5542
5591
|
|
|
5543
5592
|
"use strict";
|
|
5593
|
+
var __webpack_unused_export__;
|
|
5544
5594
|
|
|
5545
|
-
|
|
5595
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5546
5596
|
const codegen_1 = __webpack_require__(1410);
|
|
5547
5597
|
const util_1 = __webpack_require__(4227);
|
|
5548
5598
|
const code_1 = __webpack_require__(5765);
|
|
@@ -5578,8 +5628,9 @@ exports["default"] = def;
|
|
|
5578
5628
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5579
5629
|
|
|
5580
5630
|
"use strict";
|
|
5631
|
+
var __webpack_unused_export__;
|
|
5581
5632
|
|
|
5582
|
-
|
|
5633
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5583
5634
|
const util_1 = __webpack_require__(4227);
|
|
5584
5635
|
const def = {
|
|
5585
5636
|
keyword: "not",
|
|
@@ -5611,8 +5662,9 @@ exports["default"] = def;
|
|
|
5611
5662
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5612
5663
|
|
|
5613
5664
|
"use strict";
|
|
5665
|
+
var __webpack_unused_export__;
|
|
5614
5666
|
|
|
5615
|
-
|
|
5667
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5616
5668
|
const codegen_1 = __webpack_require__(1410);
|
|
5617
5669
|
const util_1 = __webpack_require__(4227);
|
|
5618
5670
|
const error = {
|
|
@@ -5678,8 +5730,9 @@ exports["default"] = def;
|
|
|
5678
5730
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5679
5731
|
|
|
5680
5732
|
"use strict";
|
|
5733
|
+
var __webpack_unused_export__;
|
|
5681
5734
|
|
|
5682
|
-
|
|
5735
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5683
5736
|
const code_1 = __webpack_require__(5765);
|
|
5684
5737
|
const codegen_1 = __webpack_require__(1410);
|
|
5685
5738
|
const util_1 = __webpack_require__(4227);
|
|
@@ -5760,8 +5813,9 @@ exports["default"] = def;
|
|
|
5760
5813
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5761
5814
|
|
|
5762
5815
|
"use strict";
|
|
5816
|
+
var __webpack_unused_export__;
|
|
5763
5817
|
|
|
5764
|
-
|
|
5818
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5765
5819
|
const items_1 = __webpack_require__(494);
|
|
5766
5820
|
const def = {
|
|
5767
5821
|
keyword: "prefixItems",
|
|
@@ -5779,8 +5833,9 @@ exports["default"] = def;
|
|
|
5779
5833
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5780
5834
|
|
|
5781
5835
|
"use strict";
|
|
5836
|
+
var __webpack_unused_export__;
|
|
5782
5837
|
|
|
5783
|
-
|
|
5838
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5784
5839
|
const validate_1 = __webpack_require__(2586);
|
|
5785
5840
|
const code_1 = __webpack_require__(5765);
|
|
5786
5841
|
const util_1 = __webpack_require__(4227);
|
|
@@ -5840,8 +5895,9 @@ exports["default"] = def;
|
|
|
5840
5895
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5841
5896
|
|
|
5842
5897
|
"use strict";
|
|
5898
|
+
var __webpack_unused_export__;
|
|
5843
5899
|
|
|
5844
|
-
|
|
5900
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5845
5901
|
const codegen_1 = __webpack_require__(1410);
|
|
5846
5902
|
const util_1 = __webpack_require__(4227);
|
|
5847
5903
|
const error = {
|
|
@@ -5885,8 +5941,9 @@ exports["default"] = def;
|
|
|
5885
5941
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5886
5942
|
|
|
5887
5943
|
"use strict";
|
|
5944
|
+
var __webpack_unused_export__;
|
|
5888
5945
|
|
|
5889
|
-
|
|
5946
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5890
5947
|
const util_1 = __webpack_require__(4227);
|
|
5891
5948
|
const def = {
|
|
5892
5949
|
keyword: ["then", "else"],
|
|
@@ -5905,9 +5962,10 @@ exports["default"] = def;
|
|
|
5905
5962
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
5906
5963
|
|
|
5907
5964
|
"use strict";
|
|
5965
|
+
var __webpack_unused_export__;
|
|
5908
5966
|
|
|
5909
|
-
|
|
5910
|
-
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode =
|
|
5967
|
+
__webpack_unused_export__ = ({ value: true });
|
|
5968
|
+
exports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = __webpack_unused_export__ = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = __webpack_unused_export__ = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;
|
|
5911
5969
|
const codegen_1 = __webpack_require__(1410);
|
|
5912
5970
|
const util_1 = __webpack_require__(4227);
|
|
5913
5971
|
const names_1 = __webpack_require__(2023);
|
|
@@ -5936,7 +5994,7 @@ function hasPropFunc(gen) {
|
|
|
5936
5994
|
code: (0, codegen_1._) `Object.prototype.hasOwnProperty`,
|
|
5937
5995
|
});
|
|
5938
5996
|
}
|
|
5939
|
-
|
|
5997
|
+
__webpack_unused_export__ = hasPropFunc;
|
|
5940
5998
|
function isOwnProperty(gen, data, property) {
|
|
5941
5999
|
return (0, codegen_1._) `${hasPropFunc(gen)}.call(${data}, ${property})`;
|
|
5942
6000
|
}
|
|
@@ -5958,7 +6016,7 @@ exports.allSchemaProperties = allSchemaProperties;
|
|
|
5958
6016
|
function schemaProperties(it, schemaMap) {
|
|
5959
6017
|
return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
|
|
5960
6018
|
}
|
|
5961
|
-
|
|
6019
|
+
__webpack_unused_export__ = schemaProperties;
|
|
5962
6020
|
function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
|
|
5963
6021
|
const dataAndSchema = passSchema ? (0, codegen_1._) `${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
|
|
5964
6022
|
const valCxt = [
|
|
@@ -6043,8 +6101,9 @@ exports.validateUnion = validateUnion;
|
|
|
6043
6101
|
(__unused_webpack_module, exports) {
|
|
6044
6102
|
|
|
6045
6103
|
"use strict";
|
|
6104
|
+
var __webpack_unused_export__;
|
|
6046
6105
|
|
|
6047
|
-
|
|
6106
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6048
6107
|
const def = {
|
|
6049
6108
|
keyword: "id",
|
|
6050
6109
|
code() {
|
|
@@ -6060,8 +6119,9 @@ exports["default"] = def;
|
|
|
6060
6119
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6061
6120
|
|
|
6062
6121
|
"use strict";
|
|
6122
|
+
var __webpack_unused_export__;
|
|
6063
6123
|
|
|
6064
|
-
|
|
6124
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6065
6125
|
const id_1 = __webpack_require__(3463);
|
|
6066
6126
|
const ref_1 = __webpack_require__(3693);
|
|
6067
6127
|
const core = [
|
|
@@ -6083,9 +6143,10 @@ exports["default"] = core;
|
|
|
6083
6143
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6084
6144
|
|
|
6085
6145
|
"use strict";
|
|
6146
|
+
var __webpack_unused_export__;
|
|
6086
6147
|
|
|
6087
|
-
|
|
6088
|
-
|
|
6148
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6149
|
+
__webpack_unused_export__ = __webpack_unused_export__ = void 0;
|
|
6089
6150
|
const ref_error_1 = __webpack_require__(4551);
|
|
6090
6151
|
const code_1 = __webpack_require__(5765);
|
|
6091
6152
|
const codegen_1 = __webpack_require__(1410);
|
|
@@ -6138,7 +6199,7 @@ function getValidate(cxt, sch) {
|
|
|
6138
6199
|
? gen.scopeValue("validate", { ref: sch.validate })
|
|
6139
6200
|
: (0, codegen_1._) `${gen.scopeValue("wrapper", { ref: sch })}.validate`;
|
|
6140
6201
|
}
|
|
6141
|
-
|
|
6202
|
+
__webpack_unused_export__ = getValidate;
|
|
6142
6203
|
function callRef(cxt, v, sch, $async) {
|
|
6143
6204
|
const { gen, it } = cxt;
|
|
6144
6205
|
const { allErrors, schemaEnv: env, opts } = it;
|
|
@@ -6202,7 +6263,7 @@ function callRef(cxt, v, sch, $async) {
|
|
|
6202
6263
|
}
|
|
6203
6264
|
}
|
|
6204
6265
|
}
|
|
6205
|
-
|
|
6266
|
+
__webpack_unused_export__ = callRef;
|
|
6206
6267
|
exports["default"] = def;
|
|
6207
6268
|
//# sourceMappingURL=ref.js.map
|
|
6208
6269
|
|
|
@@ -6212,8 +6273,9 @@ exports["default"] = def;
|
|
|
6212
6273
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6213
6274
|
|
|
6214
6275
|
"use strict";
|
|
6276
|
+
var __webpack_unused_export__;
|
|
6215
6277
|
|
|
6216
|
-
|
|
6278
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6217
6279
|
const codegen_1 = __webpack_require__(1410);
|
|
6218
6280
|
const types_1 = __webpack_require__(7652);
|
|
6219
6281
|
const compile_1 = __webpack_require__(3835);
|
|
@@ -6323,8 +6385,9 @@ exports["default"] = def;
|
|
|
6323
6385
|
(__unused_webpack_module, exports) {
|
|
6324
6386
|
|
|
6325
6387
|
"use strict";
|
|
6388
|
+
var __webpack_unused_export__;
|
|
6326
6389
|
|
|
6327
|
-
|
|
6390
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6328
6391
|
exports.DiscrError = void 0;
|
|
6329
6392
|
var DiscrError;
|
|
6330
6393
|
(function (DiscrError) {
|
|
@@ -6339,8 +6402,9 @@ var DiscrError;
|
|
|
6339
6402
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6340
6403
|
|
|
6341
6404
|
"use strict";
|
|
6405
|
+
var __webpack_unused_export__;
|
|
6342
6406
|
|
|
6343
|
-
|
|
6407
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6344
6408
|
const core_1 = __webpack_require__(2128);
|
|
6345
6409
|
const validation_1 = __webpack_require__(7060);
|
|
6346
6410
|
const applicator_1 = __webpack_require__(6378);
|
|
@@ -6363,8 +6427,9 @@ exports["default"] = draft7Vocabularies;
|
|
|
6363
6427
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6364
6428
|
|
|
6365
6429
|
"use strict";
|
|
6430
|
+
var __webpack_unused_export__;
|
|
6366
6431
|
|
|
6367
|
-
|
|
6432
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6368
6433
|
const codegen_1 = __webpack_require__(1410);
|
|
6369
6434
|
const error = {
|
|
6370
6435
|
message: ({ schemaCode }) => (0, codegen_1.str) `must match format "${schemaCode}"`,
|
|
@@ -6462,8 +6527,9 @@ exports["default"] = def;
|
|
|
6462
6527
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6463
6528
|
|
|
6464
6529
|
"use strict";
|
|
6530
|
+
var __webpack_unused_export__;
|
|
6465
6531
|
|
|
6466
|
-
|
|
6532
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6467
6533
|
const format_1 = __webpack_require__(4737);
|
|
6468
6534
|
const format = [format_1.default];
|
|
6469
6535
|
exports["default"] = format;
|
|
@@ -6475,8 +6541,9 @@ exports["default"] = format;
|
|
|
6475
6541
|
(__unused_webpack_module, exports) {
|
|
6476
6542
|
|
|
6477
6543
|
"use strict";
|
|
6544
|
+
var __webpack_unused_export__;
|
|
6478
6545
|
|
|
6479
|
-
|
|
6546
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6480
6547
|
exports.contentVocabulary = exports.metadataVocabulary = void 0;
|
|
6481
6548
|
exports.metadataVocabulary = [
|
|
6482
6549
|
"title",
|
|
@@ -6500,8 +6567,9 @@ exports.contentVocabulary = [
|
|
|
6500
6567
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6501
6568
|
|
|
6502
6569
|
"use strict";
|
|
6570
|
+
var __webpack_unused_export__;
|
|
6503
6571
|
|
|
6504
|
-
|
|
6572
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6505
6573
|
const codegen_1 = __webpack_require__(1410);
|
|
6506
6574
|
const util_1 = __webpack_require__(4227);
|
|
6507
6575
|
const equal_1 = __webpack_require__(6250);
|
|
@@ -6532,8 +6600,9 @@ exports["default"] = def;
|
|
|
6532
6600
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6533
6601
|
|
|
6534
6602
|
"use strict";
|
|
6603
|
+
var __webpack_unused_export__;
|
|
6535
6604
|
|
|
6536
|
-
|
|
6605
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6537
6606
|
const codegen_1 = __webpack_require__(1410);
|
|
6538
6607
|
const util_1 = __webpack_require__(4227);
|
|
6539
6608
|
const equal_1 = __webpack_require__(6250);
|
|
@@ -6587,8 +6656,9 @@ exports["default"] = def;
|
|
|
6587
6656
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6588
6657
|
|
|
6589
6658
|
"use strict";
|
|
6659
|
+
var __webpack_unused_export__;
|
|
6590
6660
|
|
|
6591
|
-
|
|
6661
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6592
6662
|
const limitNumber_1 = __webpack_require__(5882);
|
|
6593
6663
|
const multipleOf_1 = __webpack_require__(3439);
|
|
6594
6664
|
const limitLength_1 = __webpack_require__(7307);
|
|
@@ -6627,8 +6697,9 @@ exports["default"] = validation;
|
|
|
6627
6697
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6628
6698
|
|
|
6629
6699
|
"use strict";
|
|
6700
|
+
var __webpack_unused_export__;
|
|
6630
6701
|
|
|
6631
|
-
|
|
6702
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6632
6703
|
const codegen_1 = __webpack_require__(1410);
|
|
6633
6704
|
const error = {
|
|
6634
6705
|
message({ keyword, schemaCode }) {
|
|
@@ -6658,8 +6729,9 @@ exports["default"] = def;
|
|
|
6658
6729
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6659
6730
|
|
|
6660
6731
|
"use strict";
|
|
6732
|
+
var __webpack_unused_export__;
|
|
6661
6733
|
|
|
6662
|
-
|
|
6734
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6663
6735
|
const codegen_1 = __webpack_require__(1410);
|
|
6664
6736
|
const util_1 = __webpack_require__(4227);
|
|
6665
6737
|
const ucs2length_1 = __webpack_require__(3853);
|
|
@@ -6692,8 +6764,9 @@ exports["default"] = def;
|
|
|
6692
6764
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6693
6765
|
|
|
6694
6766
|
"use strict";
|
|
6767
|
+
var __webpack_unused_export__;
|
|
6695
6768
|
|
|
6696
|
-
|
|
6769
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6697
6770
|
const codegen_1 = __webpack_require__(1410);
|
|
6698
6771
|
const ops = codegen_1.operators;
|
|
6699
6772
|
const KWDs = {
|
|
@@ -6726,8 +6799,9 @@ exports["default"] = def;
|
|
|
6726
6799
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6727
6800
|
|
|
6728
6801
|
"use strict";
|
|
6802
|
+
var __webpack_unused_export__;
|
|
6729
6803
|
|
|
6730
|
-
|
|
6804
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6731
6805
|
const codegen_1 = __webpack_require__(1410);
|
|
6732
6806
|
const error = {
|
|
6733
6807
|
message({ keyword, schemaCode }) {
|
|
@@ -6757,8 +6831,9 @@ exports["default"] = def;
|
|
|
6757
6831
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6758
6832
|
|
|
6759
6833
|
"use strict";
|
|
6834
|
+
var __webpack_unused_export__;
|
|
6760
6835
|
|
|
6761
|
-
|
|
6836
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6762
6837
|
const codegen_1 = __webpack_require__(1410);
|
|
6763
6838
|
const error = {
|
|
6764
6839
|
message: ({ schemaCode }) => (0, codegen_1.str) `must be multiple of ${schemaCode}`,
|
|
@@ -6790,8 +6865,9 @@ exports["default"] = def;
|
|
|
6790
6865
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6791
6866
|
|
|
6792
6867
|
"use strict";
|
|
6868
|
+
var __webpack_unused_export__;
|
|
6793
6869
|
|
|
6794
|
-
|
|
6870
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6795
6871
|
const code_1 = __webpack_require__(5765);
|
|
6796
6872
|
const util_1 = __webpack_require__(4227);
|
|
6797
6873
|
const codegen_1 = __webpack_require__(1410);
|
|
@@ -6830,8 +6906,9 @@ exports["default"] = def;
|
|
|
6830
6906
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6831
6907
|
|
|
6832
6908
|
"use strict";
|
|
6909
|
+
var __webpack_unused_export__;
|
|
6833
6910
|
|
|
6834
|
-
|
|
6911
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6835
6912
|
const code_1 = __webpack_require__(5765);
|
|
6836
6913
|
const codegen_1 = __webpack_require__(1410);
|
|
6837
6914
|
const util_1 = __webpack_require__(4227);
|
|
@@ -6916,8 +6993,9 @@ exports["default"] = def;
|
|
|
6916
6993
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
6917
6994
|
|
|
6918
6995
|
"use strict";
|
|
6996
|
+
var __webpack_unused_export__;
|
|
6919
6997
|
|
|
6920
|
-
|
|
6998
|
+
__webpack_unused_export__ = ({ value: true });
|
|
6921
6999
|
const dataType_1 = __webpack_require__(208);
|
|
6922
7000
|
const codegen_1 = __webpack_require__(1410);
|
|
6923
7001
|
const util_1 = __webpack_require__(4227);
|
|
@@ -7596,11 +7674,7 @@ function createStrictSyntaxError (str, char) {
|
|
|
7596
7674
|
var partial = ''
|
|
7597
7675
|
|
|
7598
7676
|
if (index !== -1) {
|
|
7599
|
-
partial = str.substring(0, index) + JSON_SYNTAX_CHAR
|
|
7600
|
-
|
|
7601
|
-
for (var i = index + 1; i < str.length; i++) {
|
|
7602
|
-
partial += JSON_SYNTAX_CHAR
|
|
7603
|
-
}
|
|
7677
|
+
partial = str.substring(0, index) + new Array(str.length - index + 1).join(JSON_SYNTAX_CHAR)
|
|
7604
7678
|
}
|
|
7605
7679
|
|
|
7606
7680
|
try {
|
|
@@ -8137,16 +8211,15 @@ function getCharset (req) {
|
|
|
8137
8211
|
|
|
8138
8212
|
function parameterCount (body, limit) {
|
|
8139
8213
|
var count = 0
|
|
8140
|
-
var index =
|
|
8214
|
+
var index = -1
|
|
8141
8215
|
|
|
8142
|
-
|
|
8216
|
+
do {
|
|
8143
8217
|
count++
|
|
8144
|
-
|
|
8145
|
-
|
|
8146
|
-
if (count === limit) {
|
|
8218
|
+
if (count > limit) {
|
|
8147
8219
|
return undefined
|
|
8148
8220
|
}
|
|
8149
|
-
|
|
8221
|
+
index = body.indexOf('&', index + 1)
|
|
8222
|
+
} while (index !== -1)
|
|
8150
8223
|
|
|
8151
8224
|
return count
|
|
8152
8225
|
}
|
|
@@ -16123,7 +16196,8 @@ function createETagGenerator (options) {
|
|
|
16123
16196
|
|
|
16124
16197
|
function parseExtendedQueryString(str) {
|
|
16125
16198
|
return qs.parse(str, {
|
|
16126
|
-
allowPrototypes: true
|
|
16199
|
+
allowPrototypes: true,
|
|
16200
|
+
arrayLimit: 1000
|
|
16127
16201
|
});
|
|
16128
16202
|
}
|
|
16129
16203
|
|
|
@@ -25062,6 +25136,7 @@ var defaults = {
|
|
|
25062
25136
|
parseArrays: true,
|
|
25063
25137
|
plainObjects: false,
|
|
25064
25138
|
strictDepth: false,
|
|
25139
|
+
strictMerge: true,
|
|
25065
25140
|
strictNullHandling: false,
|
|
25066
25141
|
throwOnLimitExceeded: false
|
|
25067
25142
|
};
|
|
@@ -25103,10 +25178,10 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
25103
25178
|
var limit = options.parameterLimit === Infinity ? void undefined : options.parameterLimit;
|
|
25104
25179
|
var parts = cleanStr.split(
|
|
25105
25180
|
options.delimiter,
|
|
25106
|
-
options.throwOnLimitExceeded ? limit + 1 : limit
|
|
25181
|
+
options.throwOnLimitExceeded && typeof limit !== 'undefined' ? limit + 1 : limit
|
|
25107
25182
|
);
|
|
25108
25183
|
|
|
25109
|
-
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
25184
|
+
if (options.throwOnLimitExceeded && typeof limit !== 'undefined' && parts.length > limit) {
|
|
25110
25185
|
throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
|
|
25111
25186
|
}
|
|
25112
25187
|
|
|
@@ -25176,7 +25251,7 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
25176
25251
|
|
|
25177
25252
|
if (key !== null) {
|
|
25178
25253
|
var existing = has.call(obj, key);
|
|
25179
|
-
if (existing && options.duplicates === 'combine') {
|
|
25254
|
+
if (existing && (options.duplicates === 'combine' || part.indexOf('[]=') > -1)) {
|
|
25180
25255
|
obj[key] = utils.combine(
|
|
25181
25256
|
obj[key],
|
|
25182
25257
|
val,
|
|
@@ -25250,9 +25325,12 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
25250
25325
|
return leaf;
|
|
25251
25326
|
};
|
|
25252
25327
|
|
|
25253
|
-
|
|
25254
|
-
|
|
25328
|
+
// Split a key like "a[b][c[]]" into ['a', '[b]', '[c[]]'] while preserving
|
|
25329
|
+
// qs parse semantics for depth/prototype guards.
|
|
25330
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(originalKey, options) {
|
|
25331
|
+
var key = options.allowDots ? originalKey.replace(/\.([^.[]+)/g, '[$1]') : originalKey;
|
|
25255
25332
|
|
|
25333
|
+
// depth <= 0 keeps the whole key as one segment
|
|
25256
25334
|
if (options.depth <= 0) {
|
|
25257
25335
|
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
25258
25336
|
if (!options.allowPrototypes) {
|
|
@@ -25263,14 +25341,11 @@ var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
|
|
|
25263
25341
|
return [key];
|
|
25264
25342
|
}
|
|
25265
25343
|
|
|
25266
|
-
var
|
|
25267
|
-
var child = /(\[[^[\]]*])/g;
|
|
25268
|
-
|
|
25269
|
-
var segment = brackets.exec(key);
|
|
25270
|
-
var parent = segment ? key.slice(0, segment.index) : key;
|
|
25271
|
-
|
|
25272
|
-
var keys = [];
|
|
25344
|
+
var segments = [];
|
|
25273
25345
|
|
|
25346
|
+
// parent before the first '[' (may be empty if key starts with '[')
|
|
25347
|
+
var first = key.indexOf('[');
|
|
25348
|
+
var parent = first >= 0 ? key.slice(0, first) : key;
|
|
25274
25349
|
if (parent) {
|
|
25275
25350
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
25276
25351
|
if (!options.allowPrototypes) {
|
|
@@ -25278,32 +25353,62 @@ var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
|
|
|
25278
25353
|
}
|
|
25279
25354
|
}
|
|
25280
25355
|
|
|
25281
|
-
|
|
25356
|
+
segments[segments.length] = parent;
|
|
25282
25357
|
}
|
|
25283
25358
|
|
|
25284
|
-
var
|
|
25285
|
-
|
|
25286
|
-
|
|
25359
|
+
var n = key.length;
|
|
25360
|
+
var open = first;
|
|
25361
|
+
var collected = 0;
|
|
25287
25362
|
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25363
|
+
while (open >= 0 && collected < options.depth) {
|
|
25364
|
+
var level = 1;
|
|
25365
|
+
var i = open + 1;
|
|
25366
|
+
var close = -1;
|
|
25367
|
+
|
|
25368
|
+
// balance nested '[' and ']' inside this bracket group using a nesting level counter
|
|
25369
|
+
while (i < n && close < 0) {
|
|
25370
|
+
var cu = key.charCodeAt(i);
|
|
25371
|
+
if (cu === 0x5B) { // '['
|
|
25372
|
+
level += 1;
|
|
25373
|
+
} else if (cu === 0x5D) { // ']'
|
|
25374
|
+
level -= 1;
|
|
25375
|
+
if (level === 0) {
|
|
25376
|
+
close = i; // found matching close; loop will exit by condition
|
|
25377
|
+
}
|
|
25292
25378
|
}
|
|
25379
|
+
i += 1;
|
|
25380
|
+
}
|
|
25381
|
+
|
|
25382
|
+
if (close < 0) {
|
|
25383
|
+
// Unterminated group: wrap the raw remainder in one bracket pair so it stays
|
|
25384
|
+
// a single literal segment (e.g. "[[]b" -> "[[]b]"); we do not infer missing ']'.
|
|
25385
|
+
segments[segments.length] = '[' + key.slice(open) + ']';
|
|
25386
|
+
return segments;
|
|
25293
25387
|
}
|
|
25294
25388
|
|
|
25295
|
-
|
|
25389
|
+
var seg = key.slice(open, close + 1);
|
|
25390
|
+
// prototype guard for the content of this group
|
|
25391
|
+
var content = seg.slice(1, -1);
|
|
25392
|
+
if (!options.plainObjects && has.call(Object.prototype, content) && !options.allowPrototypes) {
|
|
25393
|
+
return;
|
|
25394
|
+
}
|
|
25395
|
+
|
|
25396
|
+
segments[segments.length] = seg;
|
|
25397
|
+
collected += 1;
|
|
25398
|
+
|
|
25399
|
+
// find the next '[' after this balanced group
|
|
25400
|
+
open = key.indexOf('[', close + 1);
|
|
25296
25401
|
}
|
|
25297
25402
|
|
|
25298
|
-
if (
|
|
25403
|
+
if (open >= 0) {
|
|
25299
25404
|
if (options.strictDepth === true) {
|
|
25300
25405
|
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
25301
25406
|
}
|
|
25302
25407
|
|
|
25303
|
-
|
|
25408
|
+
segments[segments.length] = '[' + key.slice(open) + ']';
|
|
25304
25409
|
}
|
|
25305
25410
|
|
|
25306
|
-
return
|
|
25411
|
+
return segments;
|
|
25307
25412
|
};
|
|
25308
25413
|
|
|
25309
25414
|
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
@@ -25376,6 +25481,7 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
25376
25481
|
parseArrays: opts.parseArrays !== false,
|
|
25377
25482
|
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
25378
25483
|
strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
|
|
25484
|
+
strictMerge: typeof opts.strictMerge === 'boolean' ? !!opts.strictMerge : defaults.strictMerge,
|
|
25379
25485
|
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
|
|
25380
25486
|
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false
|
|
25381
25487
|
};
|
|
@@ -25534,7 +25640,7 @@ var stringify = function stringify(
|
|
|
25534
25640
|
|
|
25535
25641
|
if (obj === null) {
|
|
25536
25642
|
if (strictNullHandling) {
|
|
25537
|
-
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
|
|
25643
|
+
return formatter(encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix);
|
|
25538
25644
|
}
|
|
25539
25645
|
|
|
25540
25646
|
obj = '';
|
|
@@ -25558,7 +25664,9 @@ var stringify = function stringify(
|
|
|
25558
25664
|
if (generateArrayPrefix === 'comma' && isArray(obj)) {
|
|
25559
25665
|
// we need to join elements in
|
|
25560
25666
|
if (encodeValuesOnly && encoder) {
|
|
25561
|
-
obj = utils.maybeMap(obj,
|
|
25667
|
+
obj = utils.maybeMap(obj, function (v) {
|
|
25668
|
+
return v == null ? v : encoder(v);
|
|
25669
|
+
});
|
|
25562
25670
|
}
|
|
25563
25671
|
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
25564
25672
|
} else if (isArray(filter)) {
|
|
@@ -25728,6 +25836,11 @@ module.exports = function (object, opts) {
|
|
|
25728
25836
|
var sideChannel = getSideChannel();
|
|
25729
25837
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
25730
25838
|
var key = objKeys[i];
|
|
25839
|
+
|
|
25840
|
+
if (typeof key === 'undefined' || key === null) {
|
|
25841
|
+
continue;
|
|
25842
|
+
}
|
|
25843
|
+
|
|
25731
25844
|
var value = obj[key];
|
|
25732
25845
|
|
|
25733
25846
|
if (options.skipNulls && value === null) {
|
|
@@ -25761,10 +25874,10 @@ module.exports = function (object, opts) {
|
|
|
25761
25874
|
if (options.charsetSentinel) {
|
|
25762
25875
|
if (options.charset === 'iso-8859-1') {
|
|
25763
25876
|
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
25764
|
-
prefix += 'utf8=%26%2310003%3B
|
|
25877
|
+
prefix += 'utf8=%26%2310003%3B' + options.delimiter;
|
|
25765
25878
|
} else {
|
|
25766
25879
|
// encodeURIComponent('✓')
|
|
25767
|
-
prefix += 'utf8=%E2%9C%93
|
|
25880
|
+
prefix += 'utf8=%E2%9C%93' + options.delimiter;
|
|
25768
25881
|
}
|
|
25769
25882
|
}
|
|
25770
25883
|
|
|
@@ -25865,6 +25978,8 @@ var merge = function merge(target, source, options) {
|
|
|
25865
25978
|
var newIndex = getMaxIndex(target) + 1;
|
|
25866
25979
|
target[newIndex] = source;
|
|
25867
25980
|
setMaxIndex(target, newIndex);
|
|
25981
|
+
} else if (options && options.strictMerge) {
|
|
25982
|
+
return [target, source];
|
|
25868
25983
|
} else if (
|
|
25869
25984
|
(options && (options.plainObjects || options.allowPrototypes))
|
|
25870
25985
|
|| !has.call(Object.prototype, source)
|
|
@@ -31341,9 +31456,8 @@ module.exports = function getSideChannelList() {
|
|
|
31341
31456
|
}
|
|
31342
31457
|
},
|
|
31343
31458
|
'delete': function (key) {
|
|
31344
|
-
var root = $o && $o.next;
|
|
31345
31459
|
var deletedNode = listDelete($o, key);
|
|
31346
|
-
if (deletedNode &&
|
|
31460
|
+
if (deletedNode && $o && !$o.next) {
|
|
31347
31461
|
$o = void undefined;
|
|
31348
31462
|
}
|
|
31349
31463
|
return !!deletedNode;
|
|
@@ -31365,7 +31479,6 @@ module.exports = function getSideChannelList() {
|
|
|
31365
31479
|
listSet(/** @type {NonNullable<typeof $o>} */ ($o), key, value);
|
|
31366
31480
|
}
|
|
31367
31481
|
};
|
|
31368
|
-
// @ts-expect-error TODO: figure out why this is erroring
|
|
31369
31482
|
return channel;
|
|
31370
31483
|
};
|
|
31371
31484
|
|
|
@@ -32127,6 +32240,7 @@ let McpSettingsTabComponent = class McpSettingsTabComponent {
|
|
|
32127
32240
|
this.sftpTools = sftpTools;
|
|
32128
32241
|
this.version = version_1.PLUGIN_VERSION;
|
|
32129
32242
|
this.saveMessage = '';
|
|
32243
|
+
this.lastEnvironmentDetectionEnabled = false;
|
|
32130
32244
|
// ============== Connection Monitor ==============
|
|
32131
32245
|
this.showMonitor = false;
|
|
32132
32246
|
this.sessions = [];
|
|
@@ -32169,6 +32283,14 @@ let McpSettingsTabComponent = class McpSettingsTabComponent {
|
|
|
32169
32283
|
timeout: 60000
|
|
32170
32284
|
};
|
|
32171
32285
|
}
|
|
32286
|
+
// Ensure environmentDetection config exists
|
|
32287
|
+
if (!this.config.store.mcp.environmentDetection) {
|
|
32288
|
+
this.config.store.mcp.environmentDetection = {
|
|
32289
|
+
enabled: false,
|
|
32290
|
+
useEnhancedHeuristics: true,
|
|
32291
|
+
mode: 'heuristic'
|
|
32292
|
+
};
|
|
32293
|
+
}
|
|
32172
32294
|
// Ensure new fields exist on existing config
|
|
32173
32295
|
if (this.config.store.mcp.sftp.maxUploadSize === undefined) {
|
|
32174
32296
|
this.config.store.mcp.sftp.maxUploadSize = 10 * 1024 * 1024 * 1024;
|
|
@@ -32176,6 +32298,7 @@ let McpSettingsTabComponent = class McpSettingsTabComponent {
|
|
|
32176
32298
|
if (this.config.store.mcp.sftp.maxDownloadSize === undefined) {
|
|
32177
32299
|
this.config.store.mcp.sftp.maxDownloadSize = 10 * 1024 * 1024 * 1024;
|
|
32178
32300
|
}
|
|
32301
|
+
this.lastEnvironmentDetectionEnabled = this.config.store.mcp.environmentDetection.enabled === true;
|
|
32179
32302
|
}
|
|
32180
32303
|
ngOnDestroy() {
|
|
32181
32304
|
this.configSub?.unsubscribe();
|
|
@@ -32243,10 +32366,25 @@ let McpSettingsTabComponent = class McpSettingsTabComponent {
|
|
|
32243
32366
|
window.open(url, '_blank');
|
|
32244
32367
|
}
|
|
32245
32368
|
}
|
|
32246
|
-
saveConfig() {
|
|
32247
|
-
this.config.
|
|
32248
|
-
|
|
32249
|
-
|
|
32369
|
+
async saveConfig() {
|
|
32370
|
+
const environmentDetectionEnabled = this.config.store.mcp?.environmentDetection?.enabled === true;
|
|
32371
|
+
const environmentDetectionChanged = environmentDetectionEnabled !== this.lastEnvironmentDetectionEnabled;
|
|
32372
|
+
await this.config.save();
|
|
32373
|
+
this.lastEnvironmentDetectionEnabled = environmentDetectionEnabled;
|
|
32374
|
+
if (environmentDetectionChanged && this.isRunning) {
|
|
32375
|
+
const shouldRestart = confirm(this.t('mcp.environmentDetection.restart.confirm'));
|
|
32376
|
+
if (shouldRestart) {
|
|
32377
|
+
await this.restartServer();
|
|
32378
|
+
this.saveMessage = this.t('mcp.environmentDetection.restart.done');
|
|
32379
|
+
}
|
|
32380
|
+
else {
|
|
32381
|
+
this.saveMessage = this.t('mcp.environmentDetection.restart.later');
|
|
32382
|
+
}
|
|
32383
|
+
}
|
|
32384
|
+
else {
|
|
32385
|
+
this.saveMessage = this.t('mcp.common.saved');
|
|
32386
|
+
}
|
|
32387
|
+
setTimeout(() => { this.saveMessage = ''; }, 3000);
|
|
32250
32388
|
}
|
|
32251
32389
|
// ============== Size conversion helpers (MB <-> Bytes) ==============
|
|
32252
32390
|
getMaxFileSizeMB() {
|
|
@@ -32567,6 +32705,58 @@ exports.McpSettingsTabComponent = McpSettingsTabComponent = __decorate([
|
|
|
32567
32705
|
|
|
32568
32706
|
<hr />
|
|
32569
32707
|
|
|
32708
|
+
<h4>🧭 {{ t('mcp.environmentDetection.title') }}</h4>
|
|
32709
|
+
<small class="form-text text-muted mb-2">
|
|
32710
|
+
{{ t('mcp.environmentDetection.desc') }}
|
|
32711
|
+
</small>
|
|
32712
|
+
|
|
32713
|
+
<div class="form-group">
|
|
32714
|
+
<div class="checkbox">
|
|
32715
|
+
<label>
|
|
32716
|
+
<input type="checkbox" [(ngModel)]="config.store.mcp.environmentDetection.enabled" (change)="saveConfig()">
|
|
32717
|
+
{{ t('mcp.environmentDetection.enable') }}
|
|
32718
|
+
</label>
|
|
32719
|
+
</div>
|
|
32720
|
+
<small class="form-text text-muted">
|
|
32721
|
+
{{ t('mcp.environmentDetection.enable.desc') }}
|
|
32722
|
+
</small>
|
|
32723
|
+
</div>
|
|
32724
|
+
|
|
32725
|
+
<div class="form-group" *ngIf="config.store.mcp.environmentDetection.enabled">
|
|
32726
|
+
<div class="checkbox">
|
|
32727
|
+
<label>
|
|
32728
|
+
<input type="checkbox" [(ngModel)]="config.store.mcp.environmentDetection.useEnhancedHeuristics" (change)="saveConfig()">
|
|
32729
|
+
{{ t('mcp.environmentDetection.enhanced') }}
|
|
32730
|
+
</label>
|
|
32731
|
+
</div>
|
|
32732
|
+
<small class="form-text text-muted">
|
|
32733
|
+
{{ t('mcp.environmentDetection.enhanced.desc') }}
|
|
32734
|
+
</small>
|
|
32735
|
+
</div>
|
|
32736
|
+
|
|
32737
|
+
<div class="form-group" *ngIf="config.store.mcp.environmentDetection.enabled">
|
|
32738
|
+
<label>{{ t('mcp.environmentDetection.mode') }}</label>
|
|
32739
|
+
<select class="form-control" [(ngModel)]="config.store.mcp.environmentDetection.mode" (change)="saveConfig()">
|
|
32740
|
+
<option value="heuristic">{{ t('mcp.environmentDetection.mode.heuristic') }}</option>
|
|
32741
|
+
<option value="active">{{ t('mcp.environmentDetection.mode.active') }}</option>
|
|
32742
|
+
</select>
|
|
32743
|
+
<small class="form-text text-muted">
|
|
32744
|
+
{{ t('mcp.environmentDetection.mode.desc') }}
|
|
32745
|
+
</small>
|
|
32746
|
+
</div>
|
|
32747
|
+
|
|
32748
|
+
<div class="alert alert-warning" *ngIf="config.store.mcp.environmentDetection.enabled">
|
|
32749
|
+
<strong>⚠️ {{ t('mcp.environmentDetection.warning.title') }}</strong>
|
|
32750
|
+
<ul class="mb-0">
|
|
32751
|
+
<li>{{ t('mcp.environmentDetection.warning.heuristic') }}</li>
|
|
32752
|
+
<li>{{ t('mcp.environmentDetection.warning.transient') }}</li>
|
|
32753
|
+
<li>{{ t('mcp.environmentDetection.warning.customPrompt') }}</li>
|
|
32754
|
+
<li>{{ t('mcp.environmentDetection.warning.verify') }}</li>
|
|
32755
|
+
</ul>
|
|
32756
|
+
</div>
|
|
32757
|
+
|
|
32758
|
+
<hr />
|
|
32759
|
+
|
|
32570
32760
|
<h4>🧪 {{ t('mcp.experimental.title') || 'Experimental Features' }}</h4>
|
|
32571
32761
|
|
|
32572
32762
|
<div class="form-group">
|
|
@@ -33267,6 +33457,10 @@ let McpModule = class McpModule {
|
|
|
33267
33457
|
this.tabManagementTools = tabManagementTools;
|
|
33268
33458
|
this.sftpTools = sftpTools;
|
|
33269
33459
|
this.initialized = false;
|
|
33460
|
+
this.shutdownInProgress = false;
|
|
33461
|
+
this.handleBeforeUnload = () => {
|
|
33462
|
+
this.shutdownServer('window unload');
|
|
33463
|
+
};
|
|
33270
33464
|
this.logger.info('MCP Module loading...');
|
|
33271
33465
|
// Register all tool categories with MCP service
|
|
33272
33466
|
this.mcpService.registerToolCategory(this.terminalTools);
|
|
@@ -33277,11 +33471,15 @@ let McpModule = class McpModule {
|
|
|
33277
33471
|
this.logger.info('SFTP tools registered');
|
|
33278
33472
|
}
|
|
33279
33473
|
// Initialize server after app is ready
|
|
33280
|
-
this.app.ready$.subscribe(() => {
|
|
33474
|
+
this.appReadySubscription = this.app.ready$.subscribe(() => {
|
|
33281
33475
|
this.config.ready$.toPromise().then(() => {
|
|
33282
33476
|
this.initializeOnBoot();
|
|
33283
33477
|
});
|
|
33284
33478
|
});
|
|
33479
|
+
if (typeof window !== 'undefined') {
|
|
33480
|
+
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
33481
|
+
window.addEventListener('unload', this.handleBeforeUnload);
|
|
33482
|
+
}
|
|
33285
33483
|
}
|
|
33286
33484
|
/**
|
|
33287
33485
|
* Initialize MCP server on application boot
|
|
@@ -33310,6 +33508,22 @@ let McpModule = class McpModule {
|
|
|
33310
33508
|
this.logger.error('Failed to start MCP server on boot:', error);
|
|
33311
33509
|
}
|
|
33312
33510
|
}
|
|
33511
|
+
ngOnDestroy() {
|
|
33512
|
+
this.appReadySubscription?.unsubscribe();
|
|
33513
|
+
if (typeof window !== 'undefined') {
|
|
33514
|
+
window.removeEventListener('beforeunload', this.handleBeforeUnload);
|
|
33515
|
+
window.removeEventListener('unload', this.handleBeforeUnload);
|
|
33516
|
+
}
|
|
33517
|
+
this.shutdownServer('module destroy');
|
|
33518
|
+
}
|
|
33519
|
+
shutdownServer(reason) {
|
|
33520
|
+
if (this.shutdownInProgress || !this.mcpService.isServerRunning()) {
|
|
33521
|
+
return;
|
|
33522
|
+
}
|
|
33523
|
+
this.shutdownInProgress = true;
|
|
33524
|
+
this.logger.info(`Stopping MCP server due to ${reason}...`);
|
|
33525
|
+
this.mcpService.stopServerSync(reason);
|
|
33526
|
+
}
|
|
33313
33527
|
};
|
|
33314
33528
|
McpModule = __decorate([
|
|
33315
33529
|
(0, core_1.NgModule)({
|
|
@@ -33560,6 +33774,12 @@ let McpConfigProvider = class McpConfigProvider extends tabby_core_1.ConfigProvi
|
|
|
33560
33774
|
maxUploadSize: 10 * 1024 * 1024 * 1024, // Default: 10GB
|
|
33561
33775
|
maxDownloadSize: 10 * 1024 * 1024 * 1024, // Default: 10GB
|
|
33562
33776
|
timeout: 60000 // SFTP operation timeout in ms
|
|
33777
|
+
},
|
|
33778
|
+
// Environment detection configuration
|
|
33779
|
+
environmentDetection: {
|
|
33780
|
+
enabled: false, // Default off: detection is optional and should not confuse clients unless explicitly enabled
|
|
33781
|
+
useEnhancedHeuristics: true, // Normalize ANSI/control sequences and scan recent prompt lines
|
|
33782
|
+
mode: 'heuristic' // heuristic = passive buffer analysis, active = add low-risk probing for shell sessions
|
|
33563
33783
|
}
|
|
33564
33784
|
}
|
|
33565
33785
|
};
|
|
@@ -33779,6 +33999,15 @@ const version_1 = __webpack_require__(5672);
|
|
|
33779
33999
|
* - Legacy SSE: GET /sse + POST /messages (backwards compatible)
|
|
33780
34000
|
*/
|
|
33781
34001
|
let McpService = class McpService {
|
|
34002
|
+
isToolEnabled(toolName) {
|
|
34003
|
+
if (toolName === 'get_session_environment') {
|
|
34004
|
+
return this.config?.store?.mcp?.environmentDetection?.enabled === true;
|
|
34005
|
+
}
|
|
34006
|
+
return true;
|
|
34007
|
+
}
|
|
34008
|
+
getEnabledToolsFromCategory(category) {
|
|
34009
|
+
return category.mcpTools.filter(tool => this.isToolEnabled(tool.name));
|
|
34010
|
+
}
|
|
33782
34011
|
constructor(config, logger) {
|
|
33783
34012
|
this.config = config;
|
|
33784
34013
|
this.logger = logger;
|
|
@@ -33817,8 +34046,8 @@ let McpService = class McpService {
|
|
|
33817
34046
|
name: 'Tabby MCP',
|
|
33818
34047
|
version: version_1.PLUGIN_VERSION
|
|
33819
34048
|
});
|
|
33820
|
-
// Register
|
|
33821
|
-
for (const toolDef of this.registeredTools) {
|
|
34049
|
+
// Register enabled tools with this server instance
|
|
34050
|
+
for (const toolDef of this.registeredTools.filter(tool => this.isToolEnabled(tool.name))) {
|
|
33822
34051
|
server.tool(toolDef.name, toolDef.description, toolDef.schema, toolDef.handler);
|
|
33823
34052
|
}
|
|
33824
34053
|
this.sessionServers[sessionId] = server;
|
|
@@ -33902,7 +34131,7 @@ let McpService = class McpService {
|
|
|
33902
34131
|
legacySse: '/sse',
|
|
33903
34132
|
legacyMessages: '/messages'
|
|
33904
34133
|
},
|
|
33905
|
-
tools: this.toolCategories.flatMap(c => c.
|
|
34134
|
+
tools: this.toolCategories.flatMap(c => this.getEnabledToolsFromCategory(c).map(t => ({
|
|
33906
34135
|
name: t.name,
|
|
33907
34136
|
description: t.description
|
|
33908
34137
|
})))
|
|
@@ -33911,10 +34140,10 @@ let McpService = class McpService {
|
|
|
33911
34140
|
// Tools list endpoint (for debugging)
|
|
33912
34141
|
this.app.get('/tools', (_, res) => {
|
|
33913
34142
|
res.status(200).json({
|
|
33914
|
-
count: this.toolCategories.reduce((sum, c) => sum + c.
|
|
34143
|
+
count: this.toolCategories.reduce((sum, c) => sum + this.getEnabledToolsFromCategory(c).length, 0),
|
|
33915
34144
|
categories: this.toolCategories.map(c => ({
|
|
33916
34145
|
name: c.name,
|
|
33917
|
-
tools: c.
|
|
34146
|
+
tools: this.getEnabledToolsFromCategory(c).map(t => t.name)
|
|
33918
34147
|
}))
|
|
33919
34148
|
});
|
|
33920
34149
|
});
|
|
@@ -34168,6 +34397,13 @@ let McpService = class McpService {
|
|
|
34168
34397
|
this.toolCategories.forEach(category => {
|
|
34169
34398
|
category.mcpTools.forEach(tool => {
|
|
34170
34399
|
this.app.post(`/api/tool/${tool.name}`, async (req, res) => {
|
|
34400
|
+
if (!this.isToolEnabled(tool.name)) {
|
|
34401
|
+
res.status(404).json({
|
|
34402
|
+
error: `Tool not available: ${tool.name}`,
|
|
34403
|
+
hint: 'The corresponding feature may be disabled in Settings → MCP.'
|
|
34404
|
+
});
|
|
34405
|
+
return;
|
|
34406
|
+
}
|
|
34171
34407
|
try {
|
|
34172
34408
|
this.logger.info(`API call: ${tool.name}`, req.body);
|
|
34173
34409
|
const result = await tool.handler(req.body, {});
|
|
@@ -34235,6 +34471,16 @@ let McpService = class McpService {
|
|
|
34235
34471
|
* Stop the MCP server
|
|
34236
34472
|
*/
|
|
34237
34473
|
async stopServer() {
|
|
34474
|
+
await this.stopServerInternal(false, 'manual stop');
|
|
34475
|
+
}
|
|
34476
|
+
/**
|
|
34477
|
+
* Best-effort synchronous cleanup for window/application shutdown.
|
|
34478
|
+
* Avoids awaiting async transport closes during unload while still releasing the port.
|
|
34479
|
+
*/
|
|
34480
|
+
stopServerSync(reason = 'shutdown') {
|
|
34481
|
+
void this.stopServerInternal(true, reason);
|
|
34482
|
+
}
|
|
34483
|
+
async stopServerInternal(forceImmediate, reason) {
|
|
34238
34484
|
if (!this.isRunning) {
|
|
34239
34485
|
this.logger.info('MCP server is not running');
|
|
34240
34486
|
return;
|
|
@@ -34251,15 +34497,21 @@ let McpService = class McpService {
|
|
|
34251
34497
|
});
|
|
34252
34498
|
this.legacyTransports = {};
|
|
34253
34499
|
// Close all streamable transports
|
|
34254
|
-
for (const
|
|
34500
|
+
for (const transport of Object.values(this.streamableTransports)) {
|
|
34255
34501
|
try {
|
|
34256
|
-
|
|
34502
|
+
if (forceImmediate) {
|
|
34503
|
+
void transport.close().catch(() => undefined);
|
|
34504
|
+
}
|
|
34505
|
+
else {
|
|
34506
|
+
await transport.close();
|
|
34507
|
+
}
|
|
34257
34508
|
}
|
|
34258
34509
|
catch (e) {
|
|
34259
34510
|
// Ignore close errors
|
|
34260
34511
|
}
|
|
34261
34512
|
}
|
|
34262
34513
|
this.streamableTransports = {};
|
|
34514
|
+
this.sessionMetadata.clear();
|
|
34263
34515
|
// Clear all per-session servers
|
|
34264
34516
|
this.sessionServers = {};
|
|
34265
34517
|
this.logger.debug('Cleared all per-session McpServer instances');
|
|
@@ -34273,13 +34525,27 @@ let McpService = class McpService {
|
|
|
34273
34525
|
}
|
|
34274
34526
|
// Close HTTP server
|
|
34275
34527
|
if (this.httpServer) {
|
|
34276
|
-
|
|
34277
|
-
this.httpServer.close(() => resolve());
|
|
34278
|
-
});
|
|
34528
|
+
const server = this.httpServer;
|
|
34279
34529
|
this.httpServer = undefined;
|
|
34530
|
+
this.isRunning = false;
|
|
34531
|
+
if (forceImmediate) {
|
|
34532
|
+
try {
|
|
34533
|
+
server.close();
|
|
34534
|
+
}
|
|
34535
|
+
catch (e) {
|
|
34536
|
+
// Ignore close errors
|
|
34537
|
+
}
|
|
34538
|
+
}
|
|
34539
|
+
else {
|
|
34540
|
+
await new Promise((resolve) => {
|
|
34541
|
+
server.close(() => resolve());
|
|
34542
|
+
});
|
|
34543
|
+
}
|
|
34544
|
+
}
|
|
34545
|
+
else {
|
|
34546
|
+
this.isRunning = false;
|
|
34280
34547
|
}
|
|
34281
|
-
this.
|
|
34282
|
-
this.logger.info('MCP server stopped');
|
|
34548
|
+
this.logger.info(`MCP server stopped (${reason})`);
|
|
34283
34549
|
}
|
|
34284
34550
|
catch (err) {
|
|
34285
34551
|
this.logger.error('Error stopping MCP server:', err);
|
|
@@ -34407,8 +34673,9 @@ exports.McpSettingsTabProvider = McpSettingsTabProvider = __decorate([
|
|
|
34407
34673
|
(__unused_webpack_module, exports) {
|
|
34408
34674
|
|
|
34409
34675
|
"use strict";
|
|
34676
|
+
var __webpack_unused_export__;
|
|
34410
34677
|
|
|
34411
|
-
|
|
34678
|
+
__webpack_unused_export__ = ({ value: true });
|
|
34412
34679
|
exports.BaseToolCategory = void 0;
|
|
34413
34680
|
/**
|
|
34414
34681
|
* Base class for tool categories
|
|
@@ -35940,6 +36207,281 @@ let TabManagementToolCategory = class TabManagementToolCategory extends base_too
|
|
|
35940
36207
|
this.logger.debug(`No tab found for locator: ${JSON.stringify(locator)}`);
|
|
35941
36208
|
return null;
|
|
35942
36209
|
}
|
|
36210
|
+
getQuickConnectProviders() {
|
|
36211
|
+
return this.profilesService.getProviders().filter(provider => provider.supportsQuickConnect);
|
|
36212
|
+
}
|
|
36213
|
+
getQuickConnectProvider(providerId) {
|
|
36214
|
+
return this.getQuickConnectProviders().find(provider => provider.id === providerId) ?? null;
|
|
36215
|
+
}
|
|
36216
|
+
buildSshQuickConnectProfile(query) {
|
|
36217
|
+
let user = undefined;
|
|
36218
|
+
let host = query;
|
|
36219
|
+
let port = 22;
|
|
36220
|
+
if (!host.trim()) {
|
|
36221
|
+
return null;
|
|
36222
|
+
}
|
|
36223
|
+
if (host.includes('@')) {
|
|
36224
|
+
const parts = host.split(/@/g);
|
|
36225
|
+
host = parts[parts.length - 1];
|
|
36226
|
+
user = parts.slice(0, parts.length - 1).join('@') || undefined;
|
|
36227
|
+
}
|
|
36228
|
+
if (host.includes('[')) {
|
|
36229
|
+
const closeBracketIndex = host.indexOf(']');
|
|
36230
|
+
if (closeBracketIndex === -1) {
|
|
36231
|
+
return null;
|
|
36232
|
+
}
|
|
36233
|
+
const portPart = host.slice(closeBracketIndex + 1);
|
|
36234
|
+
if (portPart.startsWith(':') && portPart.length > 1) {
|
|
36235
|
+
const parsedPort = Number(portPart.slice(1));
|
|
36236
|
+
if (!Number.isFinite(parsedPort) || parsedPort <= 0) {
|
|
36237
|
+
return null;
|
|
36238
|
+
}
|
|
36239
|
+
port = parsedPort;
|
|
36240
|
+
}
|
|
36241
|
+
host = host.slice(1, closeBracketIndex);
|
|
36242
|
+
}
|
|
36243
|
+
else if (host.includes(':')) {
|
|
36244
|
+
const parts = host.split(/:/g);
|
|
36245
|
+
if (parts.length !== 2 || !parts[0]) {
|
|
36246
|
+
return null;
|
|
36247
|
+
}
|
|
36248
|
+
const parsedPort = Number(parts[1]);
|
|
36249
|
+
if (!Number.isFinite(parsedPort) || parsedPort <= 0) {
|
|
36250
|
+
return null;
|
|
36251
|
+
}
|
|
36252
|
+
host = parts[0];
|
|
36253
|
+
port = parsedPort;
|
|
36254
|
+
}
|
|
36255
|
+
if (!host.trim()) {
|
|
36256
|
+
return null;
|
|
36257
|
+
}
|
|
36258
|
+
return {
|
|
36259
|
+
name: query,
|
|
36260
|
+
type: 'ssh',
|
|
36261
|
+
options: {
|
|
36262
|
+
host,
|
|
36263
|
+
user,
|
|
36264
|
+
port,
|
|
36265
|
+
},
|
|
36266
|
+
};
|
|
36267
|
+
}
|
|
36268
|
+
resolveQuickConnectTarget(query, protocol = 'auto') {
|
|
36269
|
+
const providers = this.getQuickConnectProviders();
|
|
36270
|
+
const providerIds = providers.map(provider => provider.id).sort();
|
|
36271
|
+
const explicitProtocolMatch = query.match(/^([a-z][a-z0-9+.-]*):\/\/(.+)$/i);
|
|
36272
|
+
let normalizedQuery = query.trim();
|
|
36273
|
+
let requestedProtocol = protocol;
|
|
36274
|
+
if (explicitProtocolMatch) {
|
|
36275
|
+
const scheme = explicitProtocolMatch[1].toLowerCase();
|
|
36276
|
+
const body = explicitProtocolMatch[2];
|
|
36277
|
+
if (scheme === 'ssh' || scheme === 'telnet' || scheme === 'socket' || scheme === 'serial') {
|
|
36278
|
+
requestedProtocol = scheme;
|
|
36279
|
+
normalizedQuery = body;
|
|
36280
|
+
}
|
|
36281
|
+
}
|
|
36282
|
+
if (requestedProtocol !== 'auto') {
|
|
36283
|
+
if (requestedProtocol === 'ssh') {
|
|
36284
|
+
return { provider: this.getQuickConnectProvider('ssh'), normalizedQuery, resolvedProtocol: 'ssh' };
|
|
36285
|
+
}
|
|
36286
|
+
const provider = this.getQuickConnectProvider(requestedProtocol);
|
|
36287
|
+
return provider
|
|
36288
|
+
? { provider, normalizedQuery, resolvedProtocol: requestedProtocol }
|
|
36289
|
+
: {
|
|
36290
|
+
provider: null,
|
|
36291
|
+
normalizedQuery,
|
|
36292
|
+
resolvedProtocol: requestedProtocol,
|
|
36293
|
+
error: `Quick connect protocol \"${requestedProtocol}\" is unavailable`,
|
|
36294
|
+
hint: providerIds.length
|
|
36295
|
+
? `Available quick-connect providers: ${providerIds.join(', ')}`
|
|
36296
|
+
: 'No quick-connect providers are currently available.'
|
|
36297
|
+
};
|
|
36298
|
+
}
|
|
36299
|
+
const sshProvider = this.getQuickConnectProvider('ssh');
|
|
36300
|
+
const telnetProvider = this.getQuickConnectProvider('telnet');
|
|
36301
|
+
const socketProvider = this.getQuickConnectProvider('socket');
|
|
36302
|
+
const serialProvider = this.getQuickConnectProvider('serial');
|
|
36303
|
+
const looksLikeSerial = /^(COM\d+|\/dev\/(tty|cu)\S+)$/i.test(normalizedQuery);
|
|
36304
|
+
if (looksLikeSerial && serialProvider) {
|
|
36305
|
+
return { provider: serialProvider, normalizedQuery, resolvedProtocol: 'serial' };
|
|
36306
|
+
}
|
|
36307
|
+
const looksLikeSsh = normalizedQuery.includes('@');
|
|
36308
|
+
if (looksLikeSsh) {
|
|
36309
|
+
return { provider: sshProvider, normalizedQuery, resolvedProtocol: 'ssh' };
|
|
36310
|
+
}
|
|
36311
|
+
const ipv6WithPort = normalizedQuery.match(/^\[.+\]:(\d+)$/);
|
|
36312
|
+
const hostWithPort = normalizedQuery.match(/^[^:@]+:(\d+)$/);
|
|
36313
|
+
const portMatch = ipv6WithPort ?? hostWithPort;
|
|
36314
|
+
if (portMatch) {
|
|
36315
|
+
const port = Number(portMatch[1]);
|
|
36316
|
+
if (port === 22) {
|
|
36317
|
+
return { provider: sshProvider, normalizedQuery, resolvedProtocol: 'ssh' };
|
|
36318
|
+
}
|
|
36319
|
+
if (port === 23 && telnetProvider) {
|
|
36320
|
+
return { provider: telnetProvider, normalizedQuery, resolvedProtocol: 'telnet' };
|
|
36321
|
+
}
|
|
36322
|
+
if (socketProvider) {
|
|
36323
|
+
return { provider: socketProvider, normalizedQuery, resolvedProtocol: 'socket' };
|
|
36324
|
+
}
|
|
36325
|
+
if (telnetProvider) {
|
|
36326
|
+
return { provider: telnetProvider, normalizedQuery, resolvedProtocol: 'telnet' };
|
|
36327
|
+
}
|
|
36328
|
+
if (sshProvider) {
|
|
36329
|
+
return { provider: sshProvider, normalizedQuery, resolvedProtocol: 'ssh' };
|
|
36330
|
+
}
|
|
36331
|
+
}
|
|
36332
|
+
if (providers.length === 1) {
|
|
36333
|
+
return { provider: providers[0], normalizedQuery, resolvedProtocol: providers[0].id };
|
|
36334
|
+
}
|
|
36335
|
+
if (sshProvider) {
|
|
36336
|
+
return { provider: sshProvider, normalizedQuery, resolvedProtocol: 'ssh' };
|
|
36337
|
+
}
|
|
36338
|
+
return {
|
|
36339
|
+
provider: null,
|
|
36340
|
+
normalizedQuery,
|
|
36341
|
+
resolvedProtocol: 'auto',
|
|
36342
|
+
error: 'Ambiguous quick connect target',
|
|
36343
|
+
hint: providerIds.length
|
|
36344
|
+
? `Specify protocol explicitly (ssh://, telnet://, socket://, serial://) or use protocol=. Available providers: ${providerIds.join(', ')}`
|
|
36345
|
+
: 'No quick-connect providers are currently available.'
|
|
36346
|
+
};
|
|
36347
|
+
}
|
|
36348
|
+
async openProfileTabAndBuildResponse(profile, params, sourceLabel) {
|
|
36349
|
+
const timeout = params?.timeout ?? 30000;
|
|
36350
|
+
this.logger.info(`[${sourceLabel}] Opening profile: ${profile.name} (type: ${profile.type})`);
|
|
36351
|
+
const tab = await this.profilesService.openNewTabForProfile(profile);
|
|
36352
|
+
if (!tab) {
|
|
36353
|
+
this.logger.error(`[${sourceLabel}] Failed to open profile: ${profile.name}`);
|
|
36354
|
+
return {
|
|
36355
|
+
content: [{ type: 'text', text: JSON.stringify({ success: false, error: 'Failed to open profile' }) }]
|
|
36356
|
+
};
|
|
36357
|
+
}
|
|
36358
|
+
const topLevelTab = this.app.getParentTab(tab) ?? tab;
|
|
36359
|
+
const tabId = this.getOrCreateTabId(topLevelTab);
|
|
36360
|
+
const tabIndex = this.app.tabs.indexOf(topLevelTab);
|
|
36361
|
+
const isSSH = profile.type === 'ssh' || profile.type?.includes('ssh');
|
|
36362
|
+
const waitForReady = params?.waitForReady ?? isSSH;
|
|
36363
|
+
let sessionId;
|
|
36364
|
+
if (tab instanceof tabby_terminal_1.BaseTerminalTabComponent) {
|
|
36365
|
+
sessionId = this.terminalTools.getOrCreateSessionId(tab);
|
|
36366
|
+
this.logger.debug(`[${sourceLabel}] SessionId assigned: ${sessionId}`);
|
|
36367
|
+
}
|
|
36368
|
+
if (!sessionId) {
|
|
36369
|
+
sessionId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
36370
|
+
const r = Math.random() * 16 | 0;
|
|
36371
|
+
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
36372
|
+
return v.toString(16);
|
|
36373
|
+
});
|
|
36374
|
+
this.logger.warn(`[${sourceLabel}] Tab is not BaseTerminalTabComponent, generated fallback sessionId: ${sessionId}`);
|
|
36375
|
+
}
|
|
36376
|
+
if (waitForReady) {
|
|
36377
|
+
const timing = this.config.store.mcp?.timing || {};
|
|
36378
|
+
const sessionPollInterval = timing.sessionPollInterval ?? 200;
|
|
36379
|
+
const sessionStableChecks = timing.sessionStableChecks ?? 5;
|
|
36380
|
+
const startTime = Date.now();
|
|
36381
|
+
let tabReady = false;
|
|
36382
|
+
let sshConnected = false;
|
|
36383
|
+
let lastBufferLength = 0;
|
|
36384
|
+
let stableCount = 0;
|
|
36385
|
+
this.logger.debug(`[${sourceLabel}] Waiting for ready (isSSH=${isSSH}, timeout=${timeout}ms)`);
|
|
36386
|
+
while (Date.now() - startTime < timeout) {
|
|
36387
|
+
const tabAny = tab;
|
|
36388
|
+
const frontendReady = tabAny.frontend !== undefined;
|
|
36389
|
+
const sessionReady = tabAny.sessionReady === true;
|
|
36390
|
+
const sessionOpen = tabAny.session?.open === true;
|
|
36391
|
+
if (isSSH) {
|
|
36392
|
+
const sshSession = tabAny.sshSession;
|
|
36393
|
+
if (sshSession && sshSession.open === true) {
|
|
36394
|
+
sshConnected = true;
|
|
36395
|
+
tabReady = true;
|
|
36396
|
+
this.logger.info(`[${sourceLabel}] SSH session connected: ${profile.name}`);
|
|
36397
|
+
break;
|
|
36398
|
+
}
|
|
36399
|
+
}
|
|
36400
|
+
else {
|
|
36401
|
+
if (sessionOpen || (frontendReady && sessionReady)) {
|
|
36402
|
+
tabReady = true;
|
|
36403
|
+
break;
|
|
36404
|
+
}
|
|
36405
|
+
}
|
|
36406
|
+
let bufferLength = 0;
|
|
36407
|
+
try {
|
|
36408
|
+
const xterm = tabAny.frontend?.xterm;
|
|
36409
|
+
if (xterm?.buffer?.active) {
|
|
36410
|
+
bufferLength = xterm.buffer.active.length;
|
|
36411
|
+
}
|
|
36412
|
+
}
|
|
36413
|
+
catch (e) {
|
|
36414
|
+
// Ignore buffer access errors
|
|
36415
|
+
}
|
|
36416
|
+
if (!isSSH) {
|
|
36417
|
+
if (bufferLength > 0 && bufferLength === lastBufferLength) {
|
|
36418
|
+
stableCount++;
|
|
36419
|
+
if (stableCount >= sessionStableChecks) {
|
|
36420
|
+
tabReady = true;
|
|
36421
|
+
break;
|
|
36422
|
+
}
|
|
36423
|
+
}
|
|
36424
|
+
else {
|
|
36425
|
+
stableCount = 0;
|
|
36426
|
+
lastBufferLength = bufferLength;
|
|
36427
|
+
}
|
|
36428
|
+
}
|
|
36429
|
+
else if (bufferLength !== lastBufferLength) {
|
|
36430
|
+
lastBufferLength = bufferLength;
|
|
36431
|
+
this.logger.debug(`[${sourceLabel}] SSH buffer activity: ${bufferLength} chars`);
|
|
36432
|
+
}
|
|
36433
|
+
await new Promise(resolve => setTimeout(resolve, sessionPollInterval));
|
|
36434
|
+
}
|
|
36435
|
+
const elapsed = Date.now() - startTime;
|
|
36436
|
+
const ready = isSSH ? (tabReady && sshConnected) : tabReady;
|
|
36437
|
+
this.logger.info(`[${sourceLabel}] Profile opened: ${profile.name} (tabReady=${tabReady}, sshConnected=${sshConnected}, ready=${ready}, elapsed=${elapsed}ms)`);
|
|
36438
|
+
return {
|
|
36439
|
+
content: [{
|
|
36440
|
+
type: 'text', text: JSON.stringify({
|
|
36441
|
+
success: true,
|
|
36442
|
+
sessionId,
|
|
36443
|
+
tabId,
|
|
36444
|
+
tabIndex,
|
|
36445
|
+
tabTitle: tab.title,
|
|
36446
|
+
profileName: profile.name,
|
|
36447
|
+
profileType: profile.type,
|
|
36448
|
+
tabReady,
|
|
36449
|
+
sshConnected: isSSH ? sshConnected : undefined,
|
|
36450
|
+
ready,
|
|
36451
|
+
elapsed: `${elapsed}ms`,
|
|
36452
|
+
message: ready
|
|
36453
|
+
? `Profile ready: ${profile.name}`
|
|
36454
|
+
: tabReady && !sshConnected
|
|
36455
|
+
? `Tab opened but SSH not connected: ${profile.name}`
|
|
36456
|
+
: `Profile opened but not fully ready: ${profile.name}`,
|
|
36457
|
+
hint: ready
|
|
36458
|
+
? 'Use sessionId with exec_command, SFTP tools, etc.'
|
|
36459
|
+
: 'Session may not be fully connected. Check sshConnected status.'
|
|
36460
|
+
})
|
|
36461
|
+
}]
|
|
36462
|
+
};
|
|
36463
|
+
}
|
|
36464
|
+
this.logger.info(`[${sourceLabel}] Profile opened (no wait): ${profile.name}`);
|
|
36465
|
+
return {
|
|
36466
|
+
content: [{
|
|
36467
|
+
type: 'text', text: JSON.stringify({
|
|
36468
|
+
success: true,
|
|
36469
|
+
sessionId,
|
|
36470
|
+
tabId,
|
|
36471
|
+
tabIndex,
|
|
36472
|
+
tabTitle: tab.title,
|
|
36473
|
+
profileName: profile.name,
|
|
36474
|
+
profileType: profile.type,
|
|
36475
|
+
tabReady: undefined,
|
|
36476
|
+
sshConnected: undefined,
|
|
36477
|
+
ready: false,
|
|
36478
|
+
message: `Opened profile: ${profile.name}`,
|
|
36479
|
+
note: 'Profile opened without waiting. Use get_session_list to check status.',
|
|
36480
|
+
hint: 'Use sessionId with exec_command, SFTP tools, etc.'
|
|
36481
|
+
})
|
|
36482
|
+
}]
|
|
36483
|
+
};
|
|
36484
|
+
}
|
|
35943
36485
|
createListTabsTool() {
|
|
35944
36486
|
return {
|
|
35945
36487
|
name: 'list_tabs',
|
|
@@ -36289,169 +36831,7 @@ NOTE: This opens a NEW tab. For existing connections, use get_session_list + exe
|
|
|
36289
36831
|
}]
|
|
36290
36832
|
};
|
|
36291
36833
|
}
|
|
36292
|
-
this.
|
|
36293
|
-
const tab = await this.profilesService.openNewTabForProfile(profile);
|
|
36294
|
-
if (tab) {
|
|
36295
|
-
const tabId = this.getOrCreateTabId(tab);
|
|
36296
|
-
const tabIndex = this.app.tabs.indexOf(tab);
|
|
36297
|
-
const isSSH = profile.type === 'ssh' || profile.type?.includes('ssh');
|
|
36298
|
-
// Determine default waitForReady based on profile type
|
|
36299
|
-
const waitForReady = params?.waitForReady ?? isSSH;
|
|
36300
|
-
// Get sessionId from TerminalToolCategory's registry
|
|
36301
|
-
// CRITICAL: Call getOrCreateSessionId DIRECTLY on the tab object
|
|
36302
|
-
// DO NOT use findTerminalSessions() as the tab may not yet be in app.tabs
|
|
36303
|
-
let sessionId;
|
|
36304
|
-
if (tab instanceof tabby_terminal_1.BaseTerminalTabComponent) {
|
|
36305
|
-
// Direct call to getOrCreateSessionId ensures the same ID is registered
|
|
36306
|
-
sessionId = this.terminalTools.getOrCreateSessionId(tab);
|
|
36307
|
-
this.logger.debug(`[open_profile] SessionId assigned: ${sessionId}`);
|
|
36308
|
-
}
|
|
36309
|
-
// Fallback: generate UUID if not a terminal tab (shouldn't happen)
|
|
36310
|
-
if (!sessionId) {
|
|
36311
|
-
sessionId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
|
36312
|
-
const r = Math.random() * 16 | 0;
|
|
36313
|
-
const v = c === 'x' ? r : (r & 0x3 | 0x8);
|
|
36314
|
-
return v.toString(16);
|
|
36315
|
-
});
|
|
36316
|
-
this.logger.warn(`[open_profile] Tab is not BaseTerminalTabComponent, generated fallback sessionId: ${sessionId}`);
|
|
36317
|
-
}
|
|
36318
|
-
if (waitForReady) {
|
|
36319
|
-
// Wait for the terminal session to be fully connected
|
|
36320
|
-
const timing = this.config.store.mcp?.timing || {};
|
|
36321
|
-
const sessionPollInterval = timing.sessionPollInterval ?? 200;
|
|
36322
|
-
const sessionStableChecks = timing.sessionStableChecks ?? 5;
|
|
36323
|
-
const startTime = Date.now();
|
|
36324
|
-
let tabReady = false;
|
|
36325
|
-
let sshConnected = false;
|
|
36326
|
-
let lastBufferLength = 0;
|
|
36327
|
-
let stableCount = 0;
|
|
36328
|
-
this.logger.debug(`[open_profile] Waiting for ready (isSSH=${isSSH}, timeout=${timeout}ms)`);
|
|
36329
|
-
while (Date.now() - startTime < timeout) {
|
|
36330
|
-
const tabAny = tab;
|
|
36331
|
-
// Check 1: Tab/Terminal Ready indicators
|
|
36332
|
-
const frontendReady = tabAny.frontend !== undefined;
|
|
36333
|
-
const sessionReady = tabAny.sessionReady === true;
|
|
36334
|
-
const hasSession = tabAny.session !== undefined;
|
|
36335
|
-
const sessionOpen = tabAny.session?.open === true;
|
|
36336
|
-
// Check 2: SSH-specific indicators (only for SSH profiles)
|
|
36337
|
-
if (isSSH) {
|
|
36338
|
-
const sshSession = tabAny.sshSession;
|
|
36339
|
-
if (sshSession && sshSession.open === true) {
|
|
36340
|
-
sshConnected = true;
|
|
36341
|
-
tabReady = true;
|
|
36342
|
-
this.logger.info(`[open_profile] SSH session connected: ${profile.name}`);
|
|
36343
|
-
break;
|
|
36344
|
-
}
|
|
36345
|
-
}
|
|
36346
|
-
else {
|
|
36347
|
-
// For non-SSH, consider ready when session is open
|
|
36348
|
-
if (sessionOpen || (frontendReady && sessionReady)) {
|
|
36349
|
-
tabReady = true;
|
|
36350
|
-
break;
|
|
36351
|
-
}
|
|
36352
|
-
}
|
|
36353
|
-
// Check 3: Buffer stability (fallback indicator)
|
|
36354
|
-
// NOTE: For SSH, buffer stability alone is NOT sufficient!
|
|
36355
|
-
// SSH may show connection prompts before actually authenticating.
|
|
36356
|
-
let bufferLength = 0;
|
|
36357
|
-
try {
|
|
36358
|
-
const xterm = tabAny.frontend?.xterm;
|
|
36359
|
-
if (xterm?.buffer?.active) {
|
|
36360
|
-
bufferLength = xterm.buffer.active.length;
|
|
36361
|
-
}
|
|
36362
|
-
}
|
|
36363
|
-
catch (e) {
|
|
36364
|
-
// Ignore buffer access errors
|
|
36365
|
-
}
|
|
36366
|
-
// For SSH: Only use buffer stability as exit AFTER sshConnected
|
|
36367
|
-
// For non-SSH: Buffer stability can be used as ready indicator
|
|
36368
|
-
if (!isSSH) {
|
|
36369
|
-
// Non-SSH: Buffer stability = ready
|
|
36370
|
-
if (bufferLength > 0 && bufferLength === lastBufferLength) {
|
|
36371
|
-
stableCount++;
|
|
36372
|
-
if (stableCount >= sessionStableChecks) {
|
|
36373
|
-
tabReady = true;
|
|
36374
|
-
break;
|
|
36375
|
-
}
|
|
36376
|
-
}
|
|
36377
|
-
else {
|
|
36378
|
-
stableCount = 0;
|
|
36379
|
-
lastBufferLength = bufferLength;
|
|
36380
|
-
}
|
|
36381
|
-
}
|
|
36382
|
-
else {
|
|
36383
|
-
// SSH: Keep checking sshSession.open in the loop above
|
|
36384
|
-
// Buffer stability alone should NOT trigger exit for SSH
|
|
36385
|
-
// Just track the buffer for debugging
|
|
36386
|
-
if (bufferLength !== lastBufferLength) {
|
|
36387
|
-
lastBufferLength = bufferLength;
|
|
36388
|
-
this.logger.debug(`[open_profile] SSH buffer activity: ${bufferLength} chars`);
|
|
36389
|
-
}
|
|
36390
|
-
}
|
|
36391
|
-
await new Promise(resolve => setTimeout(resolve, sessionPollInterval));
|
|
36392
|
-
}
|
|
36393
|
-
const elapsed = Date.now() - startTime;
|
|
36394
|
-
// Determine final ready state:
|
|
36395
|
-
// - For SSH: ready = tabReady AND sshConnected
|
|
36396
|
-
// - For non-SSH: ready = tabReady
|
|
36397
|
-
const ready = isSSH ? (tabReady && sshConnected) : tabReady;
|
|
36398
|
-
this.logger.info(`[open_profile] Profile opened: ${profile.name} (tabReady=${tabReady}, sshConnected=${sshConnected}, ready=${ready}, elapsed=${elapsed}ms)`);
|
|
36399
|
-
return {
|
|
36400
|
-
content: [{
|
|
36401
|
-
type: 'text', text: JSON.stringify({
|
|
36402
|
-
success: true,
|
|
36403
|
-
sessionId,
|
|
36404
|
-
tabId,
|
|
36405
|
-
tabIndex,
|
|
36406
|
-
tabTitle: tab.title,
|
|
36407
|
-
profileName: profile.name,
|
|
36408
|
-
profileType: profile.type,
|
|
36409
|
-
// State fields with clear semantics:
|
|
36410
|
-
tabReady, // Tab/frontend initialized
|
|
36411
|
-
sshConnected: isSSH ? sshConnected : undefined, // SSH connection established (SSH only)
|
|
36412
|
-
ready, // OVERALL ready state: can start using this session
|
|
36413
|
-
elapsed: `${elapsed}ms`,
|
|
36414
|
-
message: ready
|
|
36415
|
-
? `Profile ready: ${profile.name}`
|
|
36416
|
-
: tabReady && !sshConnected
|
|
36417
|
-
? `Tab opened but SSH not connected: ${profile.name}`
|
|
36418
|
-
: `Profile opened but not fully ready: ${profile.name}`,
|
|
36419
|
-
hint: ready
|
|
36420
|
-
? 'Use sessionId with exec_command, SFTP tools, etc.'
|
|
36421
|
-
: 'Session may not be fully connected. Check sshConnected status.'
|
|
36422
|
-
})
|
|
36423
|
-
}]
|
|
36424
|
-
};
|
|
36425
|
-
}
|
|
36426
|
-
// No waiting - return immediately
|
|
36427
|
-
this.logger.info(`[open_profile] Profile opened (no wait): ${profile.name}`);
|
|
36428
|
-
return {
|
|
36429
|
-
content: [{
|
|
36430
|
-
type: 'text', text: JSON.stringify({
|
|
36431
|
-
success: true,
|
|
36432
|
-
sessionId,
|
|
36433
|
-
tabId,
|
|
36434
|
-
tabIndex,
|
|
36435
|
-
tabTitle: tab.title,
|
|
36436
|
-
profileName: profile.name,
|
|
36437
|
-
profileType: profile.type,
|
|
36438
|
-
// State fields (unknown since we didn't wait)
|
|
36439
|
-
tabReady: undefined, // Unknown - didn't wait
|
|
36440
|
-
sshConnected: undefined, // Unknown - didn't wait
|
|
36441
|
-
ready: false, // Not verified as ready
|
|
36442
|
-
message: `Opened profile: ${profile.name}`,
|
|
36443
|
-
note: 'Profile opened without waiting. Use get_session_list to check status.',
|
|
36444
|
-
hint: 'Use sessionId with exec_command, SFTP tools, etc.'
|
|
36445
|
-
})
|
|
36446
|
-
}]
|
|
36447
|
-
};
|
|
36448
|
-
}
|
|
36449
|
-
else {
|
|
36450
|
-
this.logger.error(`[open_profile] Failed to open profile: ${profile.name}`);
|
|
36451
|
-
return {
|
|
36452
|
-
content: [{ type: 'text', text: JSON.stringify({ success: false, error: 'Failed to open profile' }) }]
|
|
36453
|
-
};
|
|
36454
|
-
}
|
|
36834
|
+
return await this.openProfileTabAndBuildResponse(profile, params, 'open_profile');
|
|
36455
36835
|
}
|
|
36456
36836
|
catch (error) {
|
|
36457
36837
|
this.logger.error('[open_profile] Error:', error);
|
|
@@ -36510,15 +36890,24 @@ Use list_profiles + open_profile for programmatic profile opening instead.`,
|
|
|
36510
36890
|
createQuickConnectTool() {
|
|
36511
36891
|
return {
|
|
36512
36892
|
name: 'quick_connect',
|
|
36513
|
-
description: `Quick
|
|
36893
|
+
description: `Quick connection - creates a NEW tab using the best matching provider.
|
|
36514
36894
|
|
|
36515
36895
|
IMPORTANT: This creates a NEW connection and tab, does NOT reuse existing sessions.
|
|
36516
36896
|
- For new connections: Use this or open_profile
|
|
36517
36897
|
- For existing sessions: Use get_session_list to find sessions, then exec_command
|
|
36518
|
-
|
|
36519
|
-
|
|
36898
|
+
- Uses the same tab/session/ready return chain as open_profile
|
|
36899
|
+
- protocol='auto' prefers SSH for user@host style input instead of relying on provider order
|
|
36900
|
+
|
|
36901
|
+
Examples:
|
|
36902
|
+
- quick_connect(query="root@192.168.1.1")
|
|
36903
|
+
- quick_connect(query="user@host:2222")
|
|
36904
|
+
- quick_connect(query="telnet://host:23", protocol="auto")
|
|
36905
|
+
- quick_connect(query="host:9000", protocol="socket")`,
|
|
36520
36906
|
schema: zod_1.z.object({
|
|
36521
|
-
query: zod_1.z.string().describe('
|
|
36907
|
+
query: zod_1.z.string().describe('Connection target, e.g. user@host, user@host:port, telnet://host:23, socket://host:9000, serial:///dev/ttyUSB0'),
|
|
36908
|
+
protocol: zod_1.z.enum(['auto', 'ssh', 'telnet', 'socket', 'serial']).optional().describe('Protocol selection strategy (default: auto)'),
|
|
36909
|
+
waitForReady: zod_1.z.boolean().optional().describe('Wait for connection readiness (default: true for SSH, false for most others)'),
|
|
36910
|
+
timeout: zod_1.z.number().optional().describe('Timeout in ms when waiting (default: 30000)')
|
|
36522
36911
|
}),
|
|
36523
36912
|
handler: async (params) => {
|
|
36524
36913
|
// Debug: log received params
|
|
@@ -36539,33 +36928,41 @@ Example: quick_connect(query="root@192.168.1.1") or quick_connect(query="user@ho
|
|
|
36539
36928
|
}]
|
|
36540
36929
|
};
|
|
36541
36930
|
}
|
|
36542
|
-
// Validate query format (basic check)
|
|
36543
|
-
if (!query.includes('@')) {
|
|
36544
|
-
return {
|
|
36545
|
-
content: [{
|
|
36546
|
-
type: 'text',
|
|
36547
|
-
text: JSON.stringify({
|
|
36548
|
-
success: false,
|
|
36549
|
-
error: 'Invalid connection string format',
|
|
36550
|
-
hint: 'Use format "user@host" or "user@host:port"',
|
|
36551
|
-
received: query
|
|
36552
|
-
})
|
|
36553
|
-
}]
|
|
36554
|
-
};
|
|
36555
|
-
}
|
|
36556
36931
|
try {
|
|
36557
|
-
const
|
|
36558
|
-
if (
|
|
36559
|
-
this.logger.info(`Quick connect to: ${query}`);
|
|
36932
|
+
const resolution = this.resolveQuickConnectTarget(query, params?.protocol ?? 'auto');
|
|
36933
|
+
if (!resolution.provider && resolution.resolvedProtocol !== 'ssh') {
|
|
36560
36934
|
return {
|
|
36561
|
-
content: [{
|
|
36935
|
+
content: [{
|
|
36936
|
+
type: 'text', text: JSON.stringify({
|
|
36937
|
+
success: false,
|
|
36938
|
+
error: resolution.error || 'Quick connect target could not be resolved',
|
|
36939
|
+
hint: resolution.hint
|
|
36940
|
+
})
|
|
36941
|
+
}]
|
|
36562
36942
|
};
|
|
36563
36943
|
}
|
|
36564
|
-
|
|
36944
|
+
const profile = resolution.resolvedProtocol === 'ssh'
|
|
36945
|
+
? this.buildSshQuickConnectProfile(resolution.normalizedQuery)
|
|
36946
|
+
: resolution.provider.quickConnect(resolution.normalizedQuery);
|
|
36947
|
+
if (!profile) {
|
|
36565
36948
|
return {
|
|
36566
|
-
content: [{
|
|
36949
|
+
content: [{
|
|
36950
|
+
type: 'text', text: JSON.stringify({
|
|
36951
|
+
success: false,
|
|
36952
|
+
error: `Invalid ${resolution.resolvedProtocol} quick connect target`,
|
|
36953
|
+
hint: resolution.resolvedProtocol === 'ssh'
|
|
36954
|
+
? 'Use format user@host, user@host:port, ssh://user@host, or ssh://user@host:port'
|
|
36955
|
+
: resolution.resolvedProtocol === 'telnet'
|
|
36956
|
+
? 'Use format host:port or telnet://host:port'
|
|
36957
|
+
: resolution.resolvedProtocol === 'socket'
|
|
36958
|
+
? 'Use format host:port or socket://host:port'
|
|
36959
|
+
: 'Use format COM3, /dev/ttyUSB0, or serial:///dev/ttyUSB0'
|
|
36960
|
+
})
|
|
36961
|
+
}]
|
|
36567
36962
|
};
|
|
36568
36963
|
}
|
|
36964
|
+
profile.type = profile.type || resolution.resolvedProtocol;
|
|
36965
|
+
return await this.openProfileTabAndBuildResponse(profile, params, 'quick_connect');
|
|
36569
36966
|
}
|
|
36570
36967
|
catch (error) {
|
|
36571
36968
|
this.logger.error('Error with quick connect:', error);
|
|
@@ -36728,12 +37125,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
36728
37125
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
36729
37126
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
36730
37127
|
};
|
|
37128
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37129
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37130
|
+
};
|
|
36731
37131
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
36732
37132
|
exports.TerminalToolCategory = void 0;
|
|
36733
37133
|
const core_1 = __webpack_require__(9430);
|
|
36734
37134
|
const tabby_core_1 = __webpack_require__(1368);
|
|
36735
37135
|
const tabby_terminal_1 = __webpack_require__(4319);
|
|
36736
37136
|
const addon_serialize_1 = __webpack_require__(4224);
|
|
37137
|
+
const strip_ansi_1 = __importDefault(__webpack_require__(3099));
|
|
36737
37138
|
const rxjs_1 = __webpack_require__(2607);
|
|
36738
37139
|
const zod_1 = __webpack_require__(7552);
|
|
36739
37140
|
const base_tool_category_1 = __webpack_require__(2099);
|
|
@@ -36771,6 +37172,7 @@ let TerminalToolCategory = class TerminalToolCategory extends base_tool_category
|
|
|
36771
37172
|
this.registerTool(this.createAbortCommandTool());
|
|
36772
37173
|
this.registerTool(this.createGetCommandStatusTool());
|
|
36773
37174
|
this.registerTool(this.createFocusPaneTool());
|
|
37175
|
+
this.registerTool(this.createGetSessionEnvironmentTool());
|
|
36774
37176
|
this.logger.info('Terminal tools initialized');
|
|
36775
37177
|
}
|
|
36776
37178
|
/**
|
|
@@ -37270,6 +37672,228 @@ Special keys: \\x03 (Ctrl+C), \\x04 (Ctrl+D), \\x1b (Escape), \\r (Enter)`,
|
|
|
37270
37672
|
}
|
|
37271
37673
|
};
|
|
37272
37674
|
}
|
|
37675
|
+
parseEnvironmentFromBuffer(session, bufferContent, useEnhancedHeuristics) {
|
|
37676
|
+
const normalizedLines = bufferContent
|
|
37677
|
+
.split('\n')
|
|
37678
|
+
.map(line => {
|
|
37679
|
+
const raw = line.trimEnd();
|
|
37680
|
+
const clean = useEnhancedHeuristics
|
|
37681
|
+
? (0, strip_ansi_1.default)(raw).replace(/\[[0-9;?]*[a-zA-Z]/g, '').trim()
|
|
37682
|
+
: raw.trim();
|
|
37683
|
+
return { raw, clean };
|
|
37684
|
+
})
|
|
37685
|
+
.filter(line => line.raw.length > 0 || line.clean.length > 0);
|
|
37686
|
+
const replMatchers = [
|
|
37687
|
+
{ environment: 'python', pattern: /^>>>$/ },
|
|
37688
|
+
{ environment: 'ruby', pattern: /^(irb>|irb\(main\):.*)$/ },
|
|
37689
|
+
{ environment: 'mysql', pattern: /^mysql>$/ },
|
|
37690
|
+
{ environment: 'postgres', pattern: /^(postgres[=#>-]?|\w+=>|\w+=#)$/ },
|
|
37691
|
+
{ environment: 'sqlite', pattern: /^sqlite>$/ },
|
|
37692
|
+
{ environment: 'mongodb', pattern: /^(mongo>|mongosh>|Enterprise\s.+>)$/ },
|
|
37693
|
+
{ environment: 'redis', pattern: /^127\.0\.0\.1:\d+>$/ },
|
|
37694
|
+
{ environment: 'node', pattern: /^>$/ },
|
|
37695
|
+
];
|
|
37696
|
+
let environment = 'unknown';
|
|
37697
|
+
let isShell = false;
|
|
37698
|
+
let promptRaw = '';
|
|
37699
|
+
let promptClean = '';
|
|
37700
|
+
const fallbackLine = normalizedLines.length > 0 ? normalizedLines[normalizedLines.length - 1] : { raw: '', clean: '' };
|
|
37701
|
+
for (let i = normalizedLines.length - 1; i >= 0; i--) {
|
|
37702
|
+
const candidate = normalizedLines[i];
|
|
37703
|
+
if (!candidate.clean) {
|
|
37704
|
+
continue;
|
|
37705
|
+
}
|
|
37706
|
+
const replMatch = replMatchers.find(m => m.pattern.test(candidate.clean));
|
|
37707
|
+
if (replMatch) {
|
|
37708
|
+
environment = replMatch.environment;
|
|
37709
|
+
promptRaw = candidate.raw;
|
|
37710
|
+
promptClean = candidate.clean;
|
|
37711
|
+
break;
|
|
37712
|
+
}
|
|
37713
|
+
if (/[$#%❯➜]\s*$/.test(candidate.clean)) {
|
|
37714
|
+
isShell = true;
|
|
37715
|
+
const detectedShell = this.detectShellType(session);
|
|
37716
|
+
environment = detectedShell === 'sh' ? 'shell' : detectedShell;
|
|
37717
|
+
promptRaw = candidate.raw;
|
|
37718
|
+
promptClean = candidate.clean;
|
|
37719
|
+
break;
|
|
37720
|
+
}
|
|
37721
|
+
}
|
|
37722
|
+
if (!promptRaw) {
|
|
37723
|
+
isShell = true;
|
|
37724
|
+
const detectedShell = this.detectShellType(session);
|
|
37725
|
+
environment = detectedShell === 'sh' ? 'shell' : detectedShell;
|
|
37726
|
+
promptRaw = fallbackLine.raw;
|
|
37727
|
+
promptClean = fallbackLine.clean;
|
|
37728
|
+
}
|
|
37729
|
+
return { environment, isShell, promptRaw, promptClean };
|
|
37730
|
+
}
|
|
37731
|
+
/**
|
|
37732
|
+
* Tool: Get the current environment context of a session
|
|
37733
|
+
*/
|
|
37734
|
+
createGetSessionEnvironmentTool() {
|
|
37735
|
+
return {
|
|
37736
|
+
name: 'get_session_environment',
|
|
37737
|
+
description: `Get the environment context of a terminal session (e.g., bash, python, node, database REPL).
|
|
37738
|
+
Use this before sending complex commands to ensure the session is in the expected state.
|
|
37739
|
+
Session targeting: sessionId (recommended) > tabIndex > title > profileName`,
|
|
37740
|
+
schema: zod_1.z.object({
|
|
37741
|
+
sessionId: zod_1.z.string().optional().describe('Stable session ID (recommended)'),
|
|
37742
|
+
tabIndex: zod_1.z.number().optional().describe('Tab index (legacy)'),
|
|
37743
|
+
title: zod_1.z.string().optional().describe('Match by title'),
|
|
37744
|
+
profileName: zod_1.z.string().optional().describe('Match by profile name')
|
|
37745
|
+
}),
|
|
37746
|
+
handler: async (params) => {
|
|
37747
|
+
const environmentDetectionConfig = this.config.store.mcp?.environmentDetection;
|
|
37748
|
+
if (environmentDetectionConfig?.enabled === false) {
|
|
37749
|
+
return {
|
|
37750
|
+
content: [{
|
|
37751
|
+
type: 'text', text: JSON.stringify({
|
|
37752
|
+
success: false,
|
|
37753
|
+
enabled: false,
|
|
37754
|
+
error: 'Environment detection is disabled in Settings → MCP',
|
|
37755
|
+
hint: 'Enable Environment Detection in the MCP settings page before using get_session_environment.'
|
|
37756
|
+
})
|
|
37757
|
+
}]
|
|
37758
|
+
};
|
|
37759
|
+
}
|
|
37760
|
+
const session = this.findSessionByLocator(params);
|
|
37761
|
+
if (!session) {
|
|
37762
|
+
return {
|
|
37763
|
+
content: [{
|
|
37764
|
+
type: 'text', text: JSON.stringify({
|
|
37765
|
+
success: false,
|
|
37766
|
+
error: 'No matching terminal session found',
|
|
37767
|
+
hint: 'Use get_session_list to see available sessions'
|
|
37768
|
+
})
|
|
37769
|
+
}]
|
|
37770
|
+
};
|
|
37771
|
+
}
|
|
37772
|
+
try {
|
|
37773
|
+
this.ensureSessionValid(session);
|
|
37774
|
+
}
|
|
37775
|
+
catch (error) {
|
|
37776
|
+
return {
|
|
37777
|
+
content: [{ type: 'text', text: JSON.stringify({ success: false, error: error.message }) }]
|
|
37778
|
+
};
|
|
37779
|
+
}
|
|
37780
|
+
const useEnhancedHeuristics = environmentDetectionConfig?.useEnhancedHeuristics !== false;
|
|
37781
|
+
const detectionMode = environmentDetectionConfig?.mode ?? 'heuristic';
|
|
37782
|
+
const bufferContent = this.getTerminalBufferText(session);
|
|
37783
|
+
const normalizedLines = bufferContent
|
|
37784
|
+
.split('\n')
|
|
37785
|
+
.map(line => {
|
|
37786
|
+
const raw = line.trimEnd();
|
|
37787
|
+
const clean = useEnhancedHeuristics
|
|
37788
|
+
? (0, strip_ansi_1.default)(raw).replace(/\[[0-9;?]*[a-zA-Z]/g, '').trim()
|
|
37789
|
+
: raw.trim();
|
|
37790
|
+
return { raw, clean };
|
|
37791
|
+
})
|
|
37792
|
+
.filter(line => line.raw.length > 0 || line.clean.length > 0);
|
|
37793
|
+
const replMatchers = [
|
|
37794
|
+
{ environment: 'python', pattern: /^>>>$/ },
|
|
37795
|
+
{ environment: 'ruby', pattern: /^(irb>|irb\(main\):.*)$/ },
|
|
37796
|
+
{ environment: 'mysql', pattern: /^mysql>$/ },
|
|
37797
|
+
{ environment: 'postgres', pattern: /^(postgres[=#>-]?|\w+=>|\w+=#)$/ },
|
|
37798
|
+
{ environment: 'sqlite', pattern: /^sqlite>$/ },
|
|
37799
|
+
{ environment: 'mongodb', pattern: /^(mongo>|mongosh>|Enterprise\s.+>)$/ },
|
|
37800
|
+
{ environment: 'redis', pattern: /^127\.0\.0\.1:\d+>$/ },
|
|
37801
|
+
{ environment: 'node', pattern: /^>$/ },
|
|
37802
|
+
];
|
|
37803
|
+
let environment = 'unknown';
|
|
37804
|
+
let isShell = false;
|
|
37805
|
+
let promptRaw = '';
|
|
37806
|
+
let promptClean = '';
|
|
37807
|
+
const fallbackLine = normalizedLines.length > 0 ? normalizedLines[normalizedLines.length - 1] : { raw: '', clean: '' };
|
|
37808
|
+
for (let i = normalizedLines.length - 1; i >= 0; i--) {
|
|
37809
|
+
const candidate = normalizedLines[i];
|
|
37810
|
+
if (!candidate.clean) {
|
|
37811
|
+
continue;
|
|
37812
|
+
}
|
|
37813
|
+
const replMatch = replMatchers.find(m => m.pattern.test(candidate.clean));
|
|
37814
|
+
if (replMatch) {
|
|
37815
|
+
environment = replMatch.environment;
|
|
37816
|
+
promptRaw = candidate.raw;
|
|
37817
|
+
promptClean = candidate.clean;
|
|
37818
|
+
break;
|
|
37819
|
+
}
|
|
37820
|
+
if (/[$#%❯➜]\s*$/.test(candidate.clean)) {
|
|
37821
|
+
isShell = true;
|
|
37822
|
+
const detectedShell = this.detectShellType(session);
|
|
37823
|
+
environment = detectedShell === 'sh' ? 'shell' : detectedShell;
|
|
37824
|
+
promptRaw = candidate.raw;
|
|
37825
|
+
promptClean = candidate.clean;
|
|
37826
|
+
break;
|
|
37827
|
+
}
|
|
37828
|
+
}
|
|
37829
|
+
if (!promptRaw) {
|
|
37830
|
+
isShell = true;
|
|
37831
|
+
const detectedShell = this.detectShellType(session);
|
|
37832
|
+
environment = detectedShell === 'sh' ? 'shell' : detectedShell;
|
|
37833
|
+
promptRaw = fallbackLine.raw;
|
|
37834
|
+
promptClean = fallbackLine.clean;
|
|
37835
|
+
}
|
|
37836
|
+
const tabAny = session.tab;
|
|
37837
|
+
const profile = tabAny.profile ? {
|
|
37838
|
+
id: tabAny.profile.id,
|
|
37839
|
+
name: tabAny.profile.name,
|
|
37840
|
+
type: tabAny.profile.type
|
|
37841
|
+
} : undefined;
|
|
37842
|
+
if (detectionMode === 'active' && isShell) {
|
|
37843
|
+
const activeEnvironment = await this.detectActiveShellEnvironment(session);
|
|
37844
|
+
if (activeEnvironment) {
|
|
37845
|
+
environment = activeEnvironment.environment;
|
|
37846
|
+
isShell = activeEnvironment.isShell;
|
|
37847
|
+
}
|
|
37848
|
+
}
|
|
37849
|
+
const shell = isShell ? (['bash', 'zsh', 'fish', 'sh', 'shell'].includes(environment) ? environment : this.detectShellType(session)) : undefined;
|
|
37850
|
+
return {
|
|
37851
|
+
content: [{
|
|
37852
|
+
type: 'text', text: JSON.stringify({
|
|
37853
|
+
success: true,
|
|
37854
|
+
sessionId: session.sessionId,
|
|
37855
|
+
environment,
|
|
37856
|
+
shell,
|
|
37857
|
+
isShell,
|
|
37858
|
+
lastPrompt: promptRaw,
|
|
37859
|
+
normalizedPrompt: promptClean || undefined,
|
|
37860
|
+
cwd: tabAny.session?.cwd,
|
|
37861
|
+
pid: tabAny.session?.pty?.pid,
|
|
37862
|
+
profile
|
|
37863
|
+
}, null, 2)
|
|
37864
|
+
}]
|
|
37865
|
+
};
|
|
37866
|
+
}
|
|
37867
|
+
};
|
|
37868
|
+
}
|
|
37869
|
+
async detectActiveShellEnvironment(session) {
|
|
37870
|
+
const tabAny = session.tab;
|
|
37871
|
+
const sessionObj = tabAny.session;
|
|
37872
|
+
if (!sessionObj || sessionObj.open === false) {
|
|
37873
|
+
return null;
|
|
37874
|
+
}
|
|
37875
|
+
const shell = this.detectShellType(session);
|
|
37876
|
+
const command = `printf '__MCP_ENV__:'; if [ -n "$VIRTUAL_ENV" ]; then printf 'python-venv'; elif [ -n "$CONDA_DEFAULT_ENV" ]; then printf 'python-conda'; elif [ -n "$IN_NIX_SHELL" ]; then printf 'nix-shell'; else printf 'shell'; fi; printf ':__MCP_ENV__'`;
|
|
37877
|
+
try {
|
|
37878
|
+
const startMarker = `__MCP_ENV_START_${Date.now()}__`;
|
|
37879
|
+
const endMarker = `__MCP_ENV_END_${Date.now()}__`;
|
|
37880
|
+
const wrappedCommand = this.getWrappedCommand(command, startMarker, endMarker, shell);
|
|
37881
|
+
session.tab.sendInput(wrappedCommand + '\n');
|
|
37882
|
+
const result = await this.waitForCommandOutputViaBuffer(session, startMarker, endMarker, 3000, () => false);
|
|
37883
|
+
const match = result.output.match(/__MCP_ENV__:(.+?):__MCP_ENV__/);
|
|
37884
|
+
if (!match) {
|
|
37885
|
+
return null;
|
|
37886
|
+
}
|
|
37887
|
+
const marker = match[1].trim();
|
|
37888
|
+
if (marker === 'python-venv' || marker === 'python-conda' || marker === 'nix-shell') {
|
|
37889
|
+
return { environment: marker, isShell: false };
|
|
37890
|
+
}
|
|
37891
|
+
return { environment: shell === 'sh' ? 'shell' : shell, isShell: true };
|
|
37892
|
+
}
|
|
37893
|
+
catch {
|
|
37894
|
+
return null;
|
|
37895
|
+
}
|
|
37896
|
+
}
|
|
37273
37897
|
/**
|
|
37274
37898
|
* Tool: Get terminal buffer content
|
|
37275
37899
|
*/
|
|
@@ -38575,6 +39199,7 @@ module.exports = require("zlib");
|
|
|
38575
39199
|
(__unused_webpack_module, exports) {
|
|
38576
39200
|
|
|
38577
39201
|
"use strict";
|
|
39202
|
+
var __webpack_unused_export__;
|
|
38578
39203
|
|
|
38579
39204
|
/**
|
|
38580
39205
|
* Experimental task capability assertion helpers.
|
|
@@ -38582,7 +39207,7 @@ module.exports = require("zlib");
|
|
|
38582
39207
|
*
|
|
38583
39208
|
* @experimental
|
|
38584
39209
|
*/
|
|
38585
|
-
|
|
39210
|
+
__webpack_unused_export__ = ({ value: true });
|
|
38586
39211
|
exports.assertToolsCallTaskCapability = assertToolsCallTaskCapability;
|
|
38587
39212
|
exports.assertClientRequestTaskCapability = assertClientRequestTaskCapability;
|
|
38588
39213
|
/**
|
|
@@ -38650,12 +39275,13 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
38650
39275
|
(__unused_webpack_module, exports) {
|
|
38651
39276
|
|
|
38652
39277
|
"use strict";
|
|
39278
|
+
var __webpack_unused_export__;
|
|
38653
39279
|
|
|
38654
39280
|
/**
|
|
38655
39281
|
* Experimental task interfaces for MCP SDK.
|
|
38656
39282
|
* WARNING: These APIs are experimental and may change without notice.
|
|
38657
39283
|
*/
|
|
38658
|
-
|
|
39284
|
+
__webpack_unused_export__ = ({ value: true });
|
|
38659
39285
|
exports.isTerminal = isTerminal;
|
|
38660
39286
|
/**
|
|
38661
39287
|
* Checks if a task status represents a terminal state.
|
|
@@ -38676,6 +39302,7 @@ function isTerminal(status) {
|
|
|
38676
39302
|
(__unused_webpack_module, exports) {
|
|
38677
39303
|
|
|
38678
39304
|
"use strict";
|
|
39305
|
+
var __webpack_unused_export__;
|
|
38679
39306
|
|
|
38680
39307
|
/**
|
|
38681
39308
|
* Experimental McpServer task features for MCP SDK.
|
|
@@ -38683,7 +39310,7 @@ function isTerminal(status) {
|
|
|
38683
39310
|
*
|
|
38684
39311
|
* @experimental
|
|
38685
39312
|
*/
|
|
38686
|
-
|
|
39313
|
+
__webpack_unused_export__ = ({ value: true });
|
|
38687
39314
|
exports.ExperimentalMcpServerTasks = void 0;
|
|
38688
39315
|
/**
|
|
38689
39316
|
* Experimental task features for McpServer.
|
|
@@ -38719,6 +39346,7 @@ exports.ExperimentalMcpServerTasks = ExperimentalMcpServerTasks;
|
|
|
38719
39346
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
38720
39347
|
|
|
38721
39348
|
"use strict";
|
|
39349
|
+
var __webpack_unused_export__;
|
|
38722
39350
|
|
|
38723
39351
|
/**
|
|
38724
39352
|
* Experimental server task features for MCP SDK.
|
|
@@ -38726,7 +39354,7 @@ exports.ExperimentalMcpServerTasks = ExperimentalMcpServerTasks;
|
|
|
38726
39354
|
*
|
|
38727
39355
|
* @experimental
|
|
38728
39356
|
*/
|
|
38729
|
-
|
|
39357
|
+
__webpack_unused_export__ = ({ value: true });
|
|
38730
39358
|
exports.ExperimentalServerTasks = void 0;
|
|
38731
39359
|
const types_js_1 = __webpack_require__(1294);
|
|
38732
39360
|
/**
|
|
@@ -38976,20 +39604,21 @@ exports.ExperimentalServerTasks = ExperimentalServerTasks;
|
|
|
38976
39604
|
(__unused_webpack_module, exports) {
|
|
38977
39605
|
|
|
38978
39606
|
"use strict";
|
|
39607
|
+
var __webpack_unused_export__;
|
|
38979
39608
|
|
|
38980
|
-
|
|
38981
|
-
|
|
38982
|
-
|
|
39609
|
+
__webpack_unused_export__ = ({ value: true });
|
|
39610
|
+
__webpack_unused_export__ = exports.MX = void 0;
|
|
39611
|
+
__webpack_unused_export__ = completable;
|
|
38983
39612
|
exports.isCompletable = isCompletable;
|
|
38984
39613
|
exports.getCompleter = getCompleter;
|
|
38985
|
-
|
|
38986
|
-
exports.
|
|
39614
|
+
__webpack_unused_export__ = unwrapCompletable;
|
|
39615
|
+
exports.MX = Symbol.for('mcp.completable');
|
|
38987
39616
|
/**
|
|
38988
39617
|
* Wraps a Zod type to provide autocompletion capabilities. Useful for, e.g., prompt arguments in MCP.
|
|
38989
39618
|
* Works with both Zod v3 and v4 schemas.
|
|
38990
39619
|
*/
|
|
38991
39620
|
function completable(schema, complete) {
|
|
38992
|
-
Object.defineProperty(schema, exports.
|
|
39621
|
+
Object.defineProperty(schema, exports.MX, {
|
|
38993
39622
|
value: { complete },
|
|
38994
39623
|
enumerable: false,
|
|
38995
39624
|
writable: false,
|
|
@@ -39001,13 +39630,13 @@ function completable(schema, complete) {
|
|
|
39001
39630
|
* Checks if a schema is completable (has completion metadata).
|
|
39002
39631
|
*/
|
|
39003
39632
|
function isCompletable(schema) {
|
|
39004
|
-
return !!schema && typeof schema === 'object' && exports.
|
|
39633
|
+
return !!schema && typeof schema === 'object' && exports.MX in schema;
|
|
39005
39634
|
}
|
|
39006
39635
|
/**
|
|
39007
39636
|
* Gets the completer callback from a completable schema, if it exists.
|
|
39008
39637
|
*/
|
|
39009
39638
|
function getCompleter(schema) {
|
|
39010
|
-
const meta = schema[exports.
|
|
39639
|
+
const meta = schema[exports.MX];
|
|
39011
39640
|
return meta?.complete;
|
|
39012
39641
|
}
|
|
39013
39642
|
/**
|
|
@@ -39022,7 +39651,7 @@ function unwrapCompletable(schema) {
|
|
|
39022
39651
|
var McpZodTypeKind;
|
|
39023
39652
|
(function (McpZodTypeKind) {
|
|
39024
39653
|
McpZodTypeKind["Completable"] = "McpCompletable";
|
|
39025
|
-
})(McpZodTypeKind || (
|
|
39654
|
+
})(McpZodTypeKind || (__webpack_unused_export__ = McpZodTypeKind = {}));
|
|
39026
39655
|
//# sourceMappingURL=completable.js.map
|
|
39027
39656
|
|
|
39028
39657
|
/***/ },
|
|
@@ -39031,8 +39660,9 @@ var McpZodTypeKind;
|
|
|
39031
39660
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
39032
39661
|
|
|
39033
39662
|
"use strict";
|
|
39663
|
+
var __webpack_unused_export__;
|
|
39034
39664
|
|
|
39035
|
-
|
|
39665
|
+
__webpack_unused_export__ = ({ value: true });
|
|
39036
39666
|
exports.Server = void 0;
|
|
39037
39667
|
const protocol_js_1 = __webpack_require__(7533);
|
|
39038
39668
|
const types_js_1 = __webpack_require__(1294);
|
|
@@ -39482,9 +40112,10 @@ exports.Server = Server;
|
|
|
39482
40112
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
39483
40113
|
|
|
39484
40114
|
"use strict";
|
|
40115
|
+
var __webpack_unused_export__;
|
|
39485
40116
|
|
|
39486
|
-
|
|
39487
|
-
|
|
40117
|
+
__webpack_unused_export__ = ({ value: true });
|
|
40118
|
+
__webpack_unused_export__ = exports.McpServer = void 0;
|
|
39488
40119
|
const index_js_1 = __webpack_require__(7467);
|
|
39489
40120
|
const zod_compat_js_1 = __webpack_require__(9029);
|
|
39490
40121
|
const zod_json_schema_compat_js_1 = __webpack_require__(7472);
|
|
@@ -40292,7 +40923,7 @@ class ResourceTemplate {
|
|
|
40292
40923
|
return this._callbacks.complete?.[variable];
|
|
40293
40924
|
}
|
|
40294
40925
|
}
|
|
40295
|
-
|
|
40926
|
+
__webpack_unused_export__ = ResourceTemplate;
|
|
40296
40927
|
const EMPTY_OBJECT_JSON_SCHEMA = {
|
|
40297
40928
|
type: 'object',
|
|
40298
40929
|
properties: {}
|
|
@@ -40590,6 +41221,7 @@ exports.SSEServerTransport = SSEServerTransport;
|
|
|
40590
41221
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
40591
41222
|
|
|
40592
41223
|
"use strict";
|
|
41224
|
+
var __webpack_unused_export__;
|
|
40593
41225
|
|
|
40594
41226
|
/**
|
|
40595
41227
|
* Node.js HTTP Streamable HTTP Server Transport
|
|
@@ -40599,7 +41231,7 @@ exports.SSEServerTransport = SSEServerTransport;
|
|
|
40599
41231
|
*
|
|
40600
41232
|
* For web-standard environments (Cloudflare Workers, Deno, Bun), use `WebStandardStreamableHTTPServerTransport` directly.
|
|
40601
41233
|
*/
|
|
40602
|
-
|
|
41234
|
+
__webpack_unused_export__ = ({ value: true });
|
|
40603
41235
|
exports.StreamableHTTPServerTransport = void 0;
|
|
40604
41236
|
const node_server_1 = __webpack_require__(4019);
|
|
40605
41237
|
const webStandardStreamableHttp_js_1 = __webpack_require__(3472);
|
|
@@ -40762,6 +41394,7 @@ exports.StreamableHTTPServerTransport = StreamableHTTPServerTransport;
|
|
|
40762
41394
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
40763
41395
|
|
|
40764
41396
|
"use strict";
|
|
41397
|
+
var __webpack_unused_export__;
|
|
40765
41398
|
|
|
40766
41399
|
/**
|
|
40767
41400
|
* Web Standards Streamable HTTP Server Transport
|
|
@@ -40771,7 +41404,7 @@ exports.StreamableHTTPServerTransport = StreamableHTTPServerTransport;
|
|
|
40771
41404
|
*
|
|
40772
41405
|
* For Node.js Express/HTTP compatibility, use `StreamableHTTPServerTransport` which wraps this transport.
|
|
40773
41406
|
*/
|
|
40774
|
-
|
|
41407
|
+
__webpack_unused_export__ = ({ value: true });
|
|
40775
41408
|
exports.WebStandardStreamableHTTPServerTransport = void 0;
|
|
40776
41409
|
const types_js_1 = __webpack_require__(1294);
|
|
40777
41410
|
/**
|
|
@@ -41861,9 +42494,10 @@ function parseWithCompat(schema, data) {
|
|
|
41861
42494
|
(__unused_webpack_module, exports, __webpack_require__) {
|
|
41862
42495
|
|
|
41863
42496
|
"use strict";
|
|
42497
|
+
var __webpack_unused_export__;
|
|
41864
42498
|
|
|
41865
|
-
|
|
41866
|
-
exports.Protocol = exports.
|
|
42499
|
+
__webpack_unused_export__ = ({ value: true });
|
|
42500
|
+
exports.Protocol = exports.d = void 0;
|
|
41867
42501
|
exports.mergeCapabilities = mergeCapabilities;
|
|
41868
42502
|
const zod_compat_js_1 = __webpack_require__(9029);
|
|
41869
42503
|
const types_js_1 = __webpack_require__(1294);
|
|
@@ -41872,7 +42506,7 @@ const zod_json_schema_compat_js_1 = __webpack_require__(7472);
|
|
|
41872
42506
|
/**
|
|
41873
42507
|
* The default request timeout, in miliseconds.
|
|
41874
42508
|
*/
|
|
41875
|
-
exports.
|
|
42509
|
+
exports.d = 60000;
|
|
41876
42510
|
/**
|
|
41877
42511
|
* Implements MCP protocol framing on top of a pluggable transport, including
|
|
41878
42512
|
* features like request/response linking, notifications, and progress.
|
|
@@ -42576,7 +43210,7 @@ class Protocol {
|
|
|
42576
43210
|
options?.signal?.addEventListener('abort', () => {
|
|
42577
43211
|
cancel(options?.signal?.reason);
|
|
42578
43212
|
});
|
|
42579
|
-
const timeout = options?.timeout ?? exports.
|
|
43213
|
+
const timeout = options?.timeout ?? exports.d;
|
|
42580
43214
|
const timeoutHandler = () => cancel(types_js_1.McpError.fromError(types_js_1.ErrorCode.RequestTimeout, 'Request timed out', { timeout }));
|
|
42581
43215
|
this._setupTimeout(messageId, timeout, options?.maxTotalTimeout, timeoutHandler, options?.resetTimeoutOnProgress ?? false);
|
|
42582
43216
|
// Queue request if related to a task
|
|
@@ -42980,6 +43614,7 @@ function mergeCapabilities(base, additional) {
|
|
|
42980
43614
|
(__unused_webpack_module, exports) {
|
|
42981
43615
|
|
|
42982
43616
|
"use strict";
|
|
43617
|
+
var __webpack_unused_export__;
|
|
42983
43618
|
|
|
42984
43619
|
/**
|
|
42985
43620
|
* Tool name validation utilities according to SEP: Specify Format for Tool Names
|
|
@@ -42990,9 +43625,9 @@ function mergeCapabilities(base, additional) {
|
|
|
42990
43625
|
* (0-9), underscore (_), dash (-), and dot (.).
|
|
42991
43626
|
* Tool names SHOULD NOT contain spaces, commas, or other special characters.
|
|
42992
43627
|
*/
|
|
42993
|
-
|
|
42994
|
-
|
|
42995
|
-
|
|
43628
|
+
__webpack_unused_export__ = ({ value: true });
|
|
43629
|
+
__webpack_unused_export__ = validateToolName;
|
|
43630
|
+
__webpack_unused_export__ = issueToolNameWarning;
|
|
42996
43631
|
exports.validateAndWarnToolName = validateAndWarnToolName;
|
|
42997
43632
|
/**
|
|
42998
43633
|
* Regular expression for valid tool names according to SEP-986 specification
|
|
@@ -43084,9 +43719,10 @@ function validateAndWarnToolName(name) {
|
|
|
43084
43719
|
(__unused_webpack_module, exports) {
|
|
43085
43720
|
|
|
43086
43721
|
"use strict";
|
|
43722
|
+
var __webpack_unused_export__;
|
|
43087
43723
|
|
|
43088
43724
|
// Claude-authored implementation of RFC 6570 URI Templates
|
|
43089
|
-
|
|
43725
|
+
__webpack_unused_export__ = ({ value: true });
|
|
43090
43726
|
exports.UriTemplate = void 0;
|
|
43091
43727
|
const MAX_TEMPLATE_LENGTH = 1000000; // 1MB
|
|
43092
43728
|
const MAX_VARIABLE_LENGTH = 1000000; // 1MB
|
|
@@ -45549,7 +46185,7 @@ exports.AjvJsonSchemaValidator = AjvJsonSchemaValidator;
|
|
|
45549
46185
|
"use strict";
|
|
45550
46186
|
|
|
45551
46187
|
|
|
45552
|
-
const { normalizeIPv6, removeDotSegments, recomposeAuthority,
|
|
46188
|
+
const { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, escapePreservingEscapes, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = __webpack_require__(4834)
|
|
45553
46189
|
const { SCHEMES, getSchemeHandler } = __webpack_require__(343)
|
|
45554
46190
|
|
|
45555
46191
|
/**
|
|
@@ -45560,7 +46196,7 @@ const { SCHEMES, getSchemeHandler } = __webpack_require__(343)
|
|
|
45560
46196
|
*/
|
|
45561
46197
|
function normalize (uri, options) {
|
|
45562
46198
|
if (typeof uri === 'string') {
|
|
45563
|
-
uri = /** @type {T} */ (
|
|
46199
|
+
uri = /** @type {T} */ (normalizeString(uri, options))
|
|
45564
46200
|
} else if (typeof uri === 'object') {
|
|
45565
46201
|
uri = /** @type {T} */ (parse(serialize(uri, options), options))
|
|
45566
46202
|
}
|
|
@@ -45655,21 +46291,10 @@ function resolveComponent (base, relative, options, skipNormalization) {
|
|
|
45655
46291
|
* @returns {boolean}
|
|
45656
46292
|
*/
|
|
45657
46293
|
function equal (uriA, uriB, options) {
|
|
45658
|
-
|
|
45659
|
-
|
|
45660
|
-
uriA = serialize(normalizeComponentEncoding(parse(uriA, options), true), { ...options, skipEscape: true })
|
|
45661
|
-
} else if (typeof uriA === 'object') {
|
|
45662
|
-
uriA = serialize(normalizeComponentEncoding(uriA, true), { ...options, skipEscape: true })
|
|
45663
|
-
}
|
|
46294
|
+
const normalizedA = normalizeComparableURI(uriA, options)
|
|
46295
|
+
const normalizedB = normalizeComparableURI(uriB, options)
|
|
45664
46296
|
|
|
45665
|
-
|
|
45666
|
-
uriB = unescape(uriB)
|
|
45667
|
-
uriB = serialize(normalizeComponentEncoding(parse(uriB, options), true), { ...options, skipEscape: true })
|
|
45668
|
-
} else if (typeof uriB === 'object') {
|
|
45669
|
-
uriB = serialize(normalizeComponentEncoding(uriB, true), { ...options, skipEscape: true })
|
|
45670
|
-
}
|
|
45671
|
-
|
|
45672
|
-
return uriA.toLowerCase() === uriB.toLowerCase()
|
|
46297
|
+
return normalizedA !== undefined && normalizedB !== undefined && normalizedA.toLowerCase() === normalizedB.toLowerCase()
|
|
45673
46298
|
}
|
|
45674
46299
|
|
|
45675
46300
|
/**
|
|
@@ -45705,13 +46330,13 @@ function serialize (cmpts, opts) {
|
|
|
45705
46330
|
|
|
45706
46331
|
if (component.path !== undefined) {
|
|
45707
46332
|
if (!options.skipEscape) {
|
|
45708
|
-
component.path =
|
|
46333
|
+
component.path = escapePreservingEscapes(component.path)
|
|
45709
46334
|
|
|
45710
46335
|
if (component.scheme !== undefined) {
|
|
45711
46336
|
component.path = component.path.split('%3A').join(':')
|
|
45712
46337
|
}
|
|
45713
46338
|
} else {
|
|
45714
|
-
component.path =
|
|
46339
|
+
component.path = normalizePercentEncoding(component.path)
|
|
45715
46340
|
}
|
|
45716
46341
|
}
|
|
45717
46342
|
|
|
@@ -45762,12 +46387,29 @@ function serialize (cmpts, opts) {
|
|
|
45762
46387
|
|
|
45763
46388
|
const URI_PARSE = /^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u
|
|
45764
46389
|
|
|
46390
|
+
/**
|
|
46391
|
+
* @param {import('./types/index').URIComponent} parsed
|
|
46392
|
+
* @param {RegExpMatchArray} matches
|
|
46393
|
+
* @returns {string|undefined}
|
|
46394
|
+
*/
|
|
46395
|
+
function getParseError (parsed, matches) {
|
|
46396
|
+
if (matches[2] !== undefined && parsed.path && parsed.path[0] !== '/') {
|
|
46397
|
+
return 'URI path must start with "/" when authority is present.'
|
|
46398
|
+
}
|
|
46399
|
+
|
|
46400
|
+
if (typeof parsed.port === 'number' && (parsed.port < 0 || parsed.port > 65535)) {
|
|
46401
|
+
return 'URI port is malformed.'
|
|
46402
|
+
}
|
|
46403
|
+
|
|
46404
|
+
return undefined
|
|
46405
|
+
}
|
|
46406
|
+
|
|
45765
46407
|
/**
|
|
45766
46408
|
* @param {string} uri
|
|
45767
46409
|
* @param {import('./types/index').Options} [opts]
|
|
45768
|
-
* @returns
|
|
46410
|
+
* @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean }}
|
|
45769
46411
|
*/
|
|
45770
|
-
function
|
|
46412
|
+
function parseWithStatus (uri, opts) {
|
|
45771
46413
|
const options = Object.assign({}, opts)
|
|
45772
46414
|
/** @type {import('./types/index').URIComponent} */
|
|
45773
46415
|
const parsed = {
|
|
@@ -45780,6 +46422,8 @@ function parse (uri, opts) {
|
|
|
45780
46422
|
fragment: undefined
|
|
45781
46423
|
}
|
|
45782
46424
|
|
|
46425
|
+
let malformedAuthorityOrPort = false
|
|
46426
|
+
|
|
45783
46427
|
let isIP = false
|
|
45784
46428
|
if (options.reference === 'suffix') {
|
|
45785
46429
|
if (options.scheme) {
|
|
@@ -45805,6 +46449,13 @@ function parse (uri, opts) {
|
|
|
45805
46449
|
if (isNaN(parsed.port)) {
|
|
45806
46450
|
parsed.port = matches[5]
|
|
45807
46451
|
}
|
|
46452
|
+
|
|
46453
|
+
const parseError = getParseError(parsed, matches)
|
|
46454
|
+
if (parseError !== undefined) {
|
|
46455
|
+
parsed.error = parsed.error || parseError
|
|
46456
|
+
malformedAuthorityOrPort = true
|
|
46457
|
+
}
|
|
46458
|
+
|
|
45808
46459
|
if (parsed.host) {
|
|
45809
46460
|
const ipv4result = isIPv4(parsed.host)
|
|
45810
46461
|
if (ipv4result === false) {
|
|
@@ -45853,14 +46504,18 @@ function parse (uri, opts) {
|
|
|
45853
46504
|
parsed.scheme = unescape(parsed.scheme)
|
|
45854
46505
|
}
|
|
45855
46506
|
if (parsed.host !== undefined) {
|
|
45856
|
-
parsed.host = unescape(parsed.host)
|
|
46507
|
+
parsed.host = reescapeHostDelimiters(unescape(parsed.host), isIP)
|
|
45857
46508
|
}
|
|
45858
46509
|
}
|
|
45859
46510
|
if (parsed.path) {
|
|
45860
|
-
parsed.path =
|
|
46511
|
+
parsed.path = normalizePathEncoding(parsed.path)
|
|
45861
46512
|
}
|
|
45862
46513
|
if (parsed.fragment) {
|
|
45863
|
-
|
|
46514
|
+
try {
|
|
46515
|
+
parsed.fragment = encodeURI(decodeURIComponent(parsed.fragment))
|
|
46516
|
+
} catch {
|
|
46517
|
+
parsed.error = parsed.error || 'URI malformed'
|
|
46518
|
+
}
|
|
45864
46519
|
}
|
|
45865
46520
|
}
|
|
45866
46521
|
|
|
@@ -45871,7 +46526,54 @@ function parse (uri, opts) {
|
|
|
45871
46526
|
} else {
|
|
45872
46527
|
parsed.error = parsed.error || 'URI can not be parsed.'
|
|
45873
46528
|
}
|
|
45874
|
-
return parsed
|
|
46529
|
+
return { parsed, malformedAuthorityOrPort }
|
|
46530
|
+
}
|
|
46531
|
+
|
|
46532
|
+
/**
|
|
46533
|
+
* @param {string} uri
|
|
46534
|
+
* @param {import('./types/index').Options} [opts]
|
|
46535
|
+
* @returns
|
|
46536
|
+
*/
|
|
46537
|
+
function parse (uri, opts) {
|
|
46538
|
+
return parseWithStatus(uri, opts).parsed
|
|
46539
|
+
}
|
|
46540
|
+
|
|
46541
|
+
/**
|
|
46542
|
+
* @param {string} uri
|
|
46543
|
+
* @param {import('./types/index').Options} [opts]
|
|
46544
|
+
* @returns {string}
|
|
46545
|
+
*/
|
|
46546
|
+
function normalizeString (uri, opts) {
|
|
46547
|
+
return normalizeStringWithStatus(uri, opts).normalized
|
|
46548
|
+
}
|
|
46549
|
+
|
|
46550
|
+
/**
|
|
46551
|
+
* @param {string} uri
|
|
46552
|
+
* @param {import('./types/index').Options} [opts]
|
|
46553
|
+
* @returns {{ normalized: string, malformedAuthorityOrPort: boolean }}
|
|
46554
|
+
*/
|
|
46555
|
+
function normalizeStringWithStatus (uri, opts) {
|
|
46556
|
+
const { parsed, malformedAuthorityOrPort } = parseWithStatus(uri, opts)
|
|
46557
|
+
return {
|
|
46558
|
+
normalized: malformedAuthorityOrPort ? uri : serialize(parsed, opts),
|
|
46559
|
+
malformedAuthorityOrPort
|
|
46560
|
+
}
|
|
46561
|
+
}
|
|
46562
|
+
|
|
46563
|
+
/**
|
|
46564
|
+
* @param {import ('./types/index').URIComponent|string} uri
|
|
46565
|
+
* @param {import('./types/index').Options} [opts]
|
|
46566
|
+
* @returns {string|undefined}
|
|
46567
|
+
*/
|
|
46568
|
+
function normalizeComparableURI (uri, opts) {
|
|
46569
|
+
if (typeof uri === 'string') {
|
|
46570
|
+
const { normalized, malformedAuthorityOrPort } = normalizeStringWithStatus(uri, opts)
|
|
46571
|
+
return malformedAuthorityOrPort ? undefined : normalized
|
|
46572
|
+
}
|
|
46573
|
+
|
|
46574
|
+
if (typeof uri === 'object') {
|
|
46575
|
+
return serialize(uri, opts)
|
|
46576
|
+
}
|
|
45875
46577
|
}
|
|
45876
46578
|
|
|
45877
46579
|
const fastUri = {
|
|
@@ -46178,6 +46880,15 @@ const isUUID = RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\d
|
|
|
46178
46880
|
/** @type {(value: string) => boolean} */
|
|
46179
46881
|
const 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)
|
|
46180
46882
|
|
|
46883
|
+
/** @type {(value: string) => boolean} */
|
|
46884
|
+
const isHexPair = RegExp.prototype.test.bind(/^[\da-f]{2}$/iu)
|
|
46885
|
+
|
|
46886
|
+
/** @type {(value: string) => boolean} */
|
|
46887
|
+
const isUnreserved = RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu)
|
|
46888
|
+
|
|
46889
|
+
/** @type {(value: string) => boolean} */
|
|
46890
|
+
const isPathCharacter = RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu)
|
|
46891
|
+
|
|
46181
46892
|
/**
|
|
46182
46893
|
* @param {Array<string>} input
|
|
46183
46894
|
* @returns {string}
|
|
@@ -46436,31 +47147,126 @@ function removeDotSegments (path) {
|
|
|
46436
47147
|
}
|
|
46437
47148
|
|
|
46438
47149
|
/**
|
|
46439
|
-
*
|
|
46440
|
-
*
|
|
46441
|
-
*
|
|
47150
|
+
* Re-escape RFC 3986 gen-delims that must not appear literally in the host.
|
|
47151
|
+
* After the URI regex parses, these characters cannot be literal in the host
|
|
47152
|
+
* field, so any that appear after decoding came from percent-encoding and
|
|
47153
|
+
* must be restored to prevent authority structure changes.
|
|
47154
|
+
*
|
|
47155
|
+
* @param {string} host
|
|
47156
|
+
* @param {boolean} isIP - true for IPv4/IPv6 hosts (skip colon re-escaping)
|
|
47157
|
+
* @returns {string}
|
|
46442
47158
|
*/
|
|
46443
|
-
|
|
46444
|
-
|
|
46445
|
-
|
|
46446
|
-
|
|
46447
|
-
|
|
46448
|
-
|
|
46449
|
-
|
|
46450
|
-
|
|
46451
|
-
|
|
46452
|
-
|
|
47159
|
+
const HOST_DELIMS = { '@': '%40', '/': '%2F', '?': '%3F', '#': '%23', ':': '%3A' }
|
|
47160
|
+
const HOST_DELIM_RE = /[@/?#:]/g
|
|
47161
|
+
const HOST_DELIM_NO_COLON_RE = /[@/?#]/g
|
|
47162
|
+
|
|
47163
|
+
function reescapeHostDelimiters (host, isIP) {
|
|
47164
|
+
const re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE
|
|
47165
|
+
re.lastIndex = 0
|
|
47166
|
+
return host.replace(re, (ch) => HOST_DELIMS[ch])
|
|
47167
|
+
}
|
|
47168
|
+
|
|
47169
|
+
/**
|
|
47170
|
+
* Normalizes percent escapes and optionally decodes only unreserved ASCII bytes.
|
|
47171
|
+
* Reserved delimiters such as `%2F` and `%2E` stay escaped.
|
|
47172
|
+
*
|
|
47173
|
+
* @param {string} input
|
|
47174
|
+
* @param {boolean} [decodeUnreserved=false]
|
|
47175
|
+
* @returns {string}
|
|
47176
|
+
*/
|
|
47177
|
+
function normalizePercentEncoding (input, decodeUnreserved = false) {
|
|
47178
|
+
if (input.indexOf('%') === -1) {
|
|
47179
|
+
return input
|
|
46453
47180
|
}
|
|
46454
|
-
|
|
46455
|
-
|
|
47181
|
+
|
|
47182
|
+
let output = ''
|
|
47183
|
+
|
|
47184
|
+
for (let i = 0; i < input.length; i++) {
|
|
47185
|
+
if (input[i] === '%' && i + 2 < input.length) {
|
|
47186
|
+
const hex = input.slice(i + 1, i + 3)
|
|
47187
|
+
if (isHexPair(hex)) {
|
|
47188
|
+
const normalizedHex = hex.toUpperCase()
|
|
47189
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16))
|
|
47190
|
+
|
|
47191
|
+
if (decodeUnreserved && isUnreserved(decoded)) {
|
|
47192
|
+
output += decoded
|
|
47193
|
+
} else {
|
|
47194
|
+
output += '%' + normalizedHex
|
|
47195
|
+
}
|
|
47196
|
+
|
|
47197
|
+
i += 2
|
|
47198
|
+
continue
|
|
47199
|
+
}
|
|
47200
|
+
}
|
|
47201
|
+
|
|
47202
|
+
output += input[i]
|
|
46456
47203
|
}
|
|
46457
|
-
|
|
46458
|
-
|
|
47204
|
+
|
|
47205
|
+
return output
|
|
47206
|
+
}
|
|
47207
|
+
|
|
47208
|
+
/**
|
|
47209
|
+
* Normalizes path data without turning reserved escapes into live path syntax.
|
|
47210
|
+
* Valid escapes are uppercased, raw unsafe characters are escaped, and only
|
|
47211
|
+
* unreserved bytes that are not `.` are decoded.
|
|
47212
|
+
*
|
|
47213
|
+
* @param {string} input
|
|
47214
|
+
* @returns {string}
|
|
47215
|
+
*/
|
|
47216
|
+
function normalizePathEncoding (input) {
|
|
47217
|
+
let output = ''
|
|
47218
|
+
|
|
47219
|
+
for (let i = 0; i < input.length; i++) {
|
|
47220
|
+
if (input[i] === '%' && i + 2 < input.length) {
|
|
47221
|
+
const hex = input.slice(i + 1, i + 3)
|
|
47222
|
+
if (isHexPair(hex)) {
|
|
47223
|
+
const normalizedHex = hex.toUpperCase()
|
|
47224
|
+
const decoded = String.fromCharCode(parseInt(normalizedHex, 16))
|
|
47225
|
+
|
|
47226
|
+
if (decoded !== '.' && isUnreserved(decoded)) {
|
|
47227
|
+
output += decoded
|
|
47228
|
+
} else {
|
|
47229
|
+
output += '%' + normalizedHex
|
|
47230
|
+
}
|
|
47231
|
+
|
|
47232
|
+
i += 2
|
|
47233
|
+
continue
|
|
47234
|
+
}
|
|
47235
|
+
}
|
|
47236
|
+
|
|
47237
|
+
if (isPathCharacter(input[i])) {
|
|
47238
|
+
output += input[i]
|
|
47239
|
+
} else {
|
|
47240
|
+
output += escape(input[i])
|
|
47241
|
+
}
|
|
46459
47242
|
}
|
|
46460
|
-
|
|
46461
|
-
|
|
47243
|
+
|
|
47244
|
+
return output
|
|
47245
|
+
}
|
|
47246
|
+
|
|
47247
|
+
/**
|
|
47248
|
+
* Escapes a component while preserving existing valid percent escapes.
|
|
47249
|
+
*
|
|
47250
|
+
* @param {string} input
|
|
47251
|
+
* @returns {string}
|
|
47252
|
+
*/
|
|
47253
|
+
function escapePreservingEscapes (input) {
|
|
47254
|
+
let output = ''
|
|
47255
|
+
|
|
47256
|
+
for (let i = 0; i < input.length; i++) {
|
|
47257
|
+
if (input[i] === '%' && i + 2 < input.length) {
|
|
47258
|
+
const hex = input.slice(i + 1, i + 3)
|
|
47259
|
+
if (isHexPair(hex)) {
|
|
47260
|
+
output += '%' + hex.toUpperCase()
|
|
47261
|
+
i += 2
|
|
47262
|
+
continue
|
|
47263
|
+
}
|
|
47264
|
+
}
|
|
47265
|
+
|
|
47266
|
+
output += escape(input[i])
|
|
46462
47267
|
}
|
|
46463
|
-
|
|
47268
|
+
|
|
47269
|
+
return output
|
|
46464
47270
|
}
|
|
46465
47271
|
|
|
46466
47272
|
/**
|
|
@@ -46482,7 +47288,7 @@ function recomposeAuthority (component) {
|
|
|
46482
47288
|
if (ipV6res.isIPV6 === true) {
|
|
46483
47289
|
host = `[${ipV6res.escapedHost}]`
|
|
46484
47290
|
} else {
|
|
46485
|
-
host =
|
|
47291
|
+
host = reescapeHostDelimiters(host, false)
|
|
46486
47292
|
}
|
|
46487
47293
|
}
|
|
46488
47294
|
uriTokens.push(host)
|
|
@@ -46499,7 +47305,10 @@ function recomposeAuthority (component) {
|
|
|
46499
47305
|
module.exports = {
|
|
46500
47306
|
nonSimpleDomain,
|
|
46501
47307
|
recomposeAuthority,
|
|
46502
|
-
|
|
47308
|
+
reescapeHostDelimiters,
|
|
47309
|
+
normalizePercentEncoding,
|
|
47310
|
+
normalizePathEncoding,
|
|
47311
|
+
escapePreservingEscapes,
|
|
46503
47312
|
removeDotSegments,
|
|
46504
47313
|
isIPv4,
|
|
46505
47314
|
isUUID,
|
|
@@ -48687,8 +49496,9 @@ __exportStar(__webpack_require__(8651), exports);
|
|
|
48687
49496
|
(__unused_webpack_module, exports) {
|
|
48688
49497
|
|
|
48689
49498
|
"use strict";
|
|
49499
|
+
var __webpack_unused_export__;
|
|
48690
49500
|
|
|
48691
|
-
|
|
49501
|
+
__webpack_unused_export__ = ({ value: true });
|
|
48692
49502
|
exports.errorUtil = void 0;
|
|
48693
49503
|
var errorUtil;
|
|
48694
49504
|
(function (errorUtil) {
|
|
@@ -67430,6 +68240,58 @@ function json() {
|
|
|
67430
68240
|
}
|
|
67431
68241
|
|
|
67432
68242
|
|
|
68243
|
+
/***/ },
|
|
68244
|
+
|
|
68245
|
+
/***/ 3099
|
|
68246
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
68247
|
+
|
|
68248
|
+
"use strict";
|
|
68249
|
+
// ESM COMPAT FLAG
|
|
68250
|
+
__webpack_require__.r(__webpack_exports__);
|
|
68251
|
+
|
|
68252
|
+
// EXPORTS
|
|
68253
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
68254
|
+
"default": () => (/* binding */ stripAnsi)
|
|
68255
|
+
});
|
|
68256
|
+
|
|
68257
|
+
;// ./node_modules/ansi-regex/index.js
|
|
68258
|
+
function ansiRegex({onlyFirst = false} = {}) {
|
|
68259
|
+
// Valid string terminator sequences are BEL, ESC\, and 0x9c
|
|
68260
|
+
const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)';
|
|
68261
|
+
|
|
68262
|
+
// OSC sequences only: ESC ] ... ST (non-greedy until the first ST)
|
|
68263
|
+
const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`;
|
|
68264
|
+
|
|
68265
|
+
// CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte
|
|
68266
|
+
const csi = '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]';
|
|
68267
|
+
|
|
68268
|
+
const pattern = `${osc}|${csi}`;
|
|
68269
|
+
|
|
68270
|
+
return new RegExp(pattern, onlyFirst ? undefined : 'g');
|
|
68271
|
+
}
|
|
68272
|
+
|
|
68273
|
+
;// ./node_modules/strip-ansi/index.js
|
|
68274
|
+
|
|
68275
|
+
|
|
68276
|
+
const regex = ansiRegex();
|
|
68277
|
+
|
|
68278
|
+
function stripAnsi(string) {
|
|
68279
|
+
if (typeof string !== 'string') {
|
|
68280
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
|
|
68281
|
+
}
|
|
68282
|
+
|
|
68283
|
+
// Fast path: ANSI codes require ESC (7-bit) or CSI (8-bit) introducer
|
|
68284
|
+
if (!string.includes('\u001B') && !string.includes('\u009B')) {
|
|
68285
|
+
return string;
|
|
68286
|
+
}
|
|
68287
|
+
|
|
68288
|
+
// Even though the regex is global, we don't need to reset the `.lastIndex`
|
|
68289
|
+
// because unlike `.exec()` and `.test()`, `.replace()` does it automatically
|
|
68290
|
+
// and doing it manually has a performance penalty.
|
|
68291
|
+
return string.replace(regex, '');
|
|
68292
|
+
}
|
|
68293
|
+
|
|
68294
|
+
|
|
67433
68295
|
/***/ },
|
|
67434
68296
|
|
|
67435
68297
|
/***/ 3837
|
|
@@ -67604,7 +68466,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Pro
|
|
|
67604
68466
|
(module) {
|
|
67605
68467
|
|
|
67606
68468
|
"use strict";
|
|
67607
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"tabby-mcp-server","version":"1.
|
|
68469
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"tabby-mcp-server","version":"1.6.2","description":"MCP (Model Context Protocol) server plugin for Tabby terminal - Complete terminal control with 34 MCP tools including SFTP file transfer","homepage":"https://github.com/GentlemanHu/Tabby-MCP","repository":{"type":"git","url":"git+https://github.com/GentlemanHu/Tabby-MCP.git"},"bugs":{"url":"https://github.com/GentlemanHu/Tabby-MCP/issues"},"keywords":["tabby-plugin","mcp","model-context-protocol","terminal","ai","cursor","windsurf","ssh","sftp","sse"],"main":"dist/index.js","typings":"typings/index.d.ts","scripts":{"build":"webpack --progress --color","watch":"webpack --progress --color --watch","install-plugin":"bash scripts/install.sh","uninstall-plugin":"bash scripts/uninstall.sh"},"files":["dist","typings"],"author":"GentlemanHu <justfeelingme@gmail.com>","contributors":["AI Assistant (Claude/Gemini)"],"license":"MIT","peerDependencies":{"@angular/animations":"*","@angular/common":"*","@angular/core":"*","@angular/forms":"*","@ng-bootstrap/ng-bootstrap":"*","rxjs":"*","tabby-core":"*","tabby-settings":"*","tabby-terminal":"*","tabby-ssh":"*"},"peerDependenciesMeta":{"tabby-ssh":{"optional":true},"@angular/animations":{"optional":true},"@angular/common":{"optional":true},"@angular/core":{"optional":true},"@angular/forms":{"optional":true},"@ng-bootstrap/ng-bootstrap":{"optional":true},"rxjs":{"optional":true},"tabby-core":{"optional":true},"tabby-settings":{"optional":true},"tabby-terminal":{"optional":true}},"devDependencies":{"@modelcontextprotocol/sdk":"^1.8.0","@xterm/addon-serialize":"^0.12.0","cors":"^2.8.5","express":"^4.18.2","zod":"^3.22.4","@angular/common":"^17.3.0","@angular/core":"^17.3.0","@angular/forms":"^17.3.0","@angular/animations":"^17.3.0","@angular/platform-browser":"^17.3.0","@ng-bootstrap/ng-bootstrap":"^16.0.0","rxjs":"^7.8.0","tabby-core":"^1.0.163","tabby-settings":"^1.0.163","tabby-ssh":"^1.0.163","tabby-terminal":"^1.0.163","@types/cors":"^2.8.17","@types/express":"^4.17.21","@types/node":"^20.10.0","apply-loader":"^2.0.0","css-loader":"^6.8.1","sass":"^1.69.0","sass-loader":"^13.3.2","strip-ansi":"^7.1.0","style-loader":"^3.3.3","ts-loader":"^9.5.0","typescript":"^5.3.0","webpack":"^5.89.0","webpack-cli":"^5.1.4"}}');
|
|
67608
68470
|
|
|
67609
68471
|
/***/ },
|
|
67610
68472
|
|
|
@@ -67612,7 +68474,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"tabby-mcp-server","version":"
|
|
|
67612
68474
|
(module) {
|
|
67613
68475
|
|
|
67614
68476
|
"use strict";
|
|
67615
|
-
module.exports = /*#__PURE__*/JSON.parse('{"mcp.settings.title":"MCP Server Settings","mcp.settings.version":"v{version}","mcp.server.status":"Server Status","mcp.server.running":"Running","mcp.server.stopped":"Stopped","mcp.server.connections":"{count} connection(s)","mcp.server.start":"Start Server","mcp.server.stop":"Stop Server","mcp.server.restart":"Restart","mcp.config.port":"Port","mcp.config.port.desc":"MCP server port (default: 3001)","mcp.config.startOnBoot":"Start server on Tabby launch","mcp.logging.title":"Logging","mcp.logging.enable":"Enable logging","mcp.logging.level":"Log Level","mcp.logging.level.debug":"Debug","mcp.logging.level.info":"Info","mcp.logging.level.warn":"Warning","mcp.logging.level.error":"Error","mcp.logging.viewLogs":"View Logs","mcp.logging.exportJson":"Export JSON","mcp.logging.clearLogs":"Clear Logs","mcp.pairProgramming.title":"Pair Programming Mode","mcp.pairProgramming.enable":"Enable Pair Programming Mode","mcp.pairProgramming.enable.desc":"When enabled, AI commands require confirmation before execution","mcp.pairProgramming.showDialog":"Show confirmation dialog","mcp.pairProgramming.autoFocus":"Auto-focus terminal on command execution","mcp.sessionTracking.title":"Session Tracking","mcp.sessionTracking.desc":"Configure how sessions and tabs are identified","mcp.sessionTracking.stableIds":"Use stable UUIDs for session identification","mcp.sessionTracking.stableIds.desc":"Sessions get persistent IDs that don\'t change when tabs are reordered","mcp.sessionTracking.profileInfo":"Include profile info in session list","mcp.sessionTracking.pid":"Include process ID in session info","mcp.sessionTracking.cwd":"Include current working directory in session info","mcp.backgroundExecution.title":"Background Execution","mcp.backgroundExecution.desc":"Control whether MCP operations run in the background without switching focus","mcp.backgroundExecution.enable":"Enable Background Execution Mode","mcp.backgroundExecution.enable.desc":"When enabled, AI commands execute without switching focus to the target terminal. You can continue working on other tabs while AI runs commands in the background.","mcp.backgroundExecution.warning.title":"Background Execution Risks:","mcp.backgroundExecution.warning.visibility":"Limited Visibility: You won\'t see commands executing in real-time","mcp.backgroundExecution.warning.conflicts":"Input Conflicts: If you type in the target terminal while AI is running, input will mix and cause errors","mcp.backgroundExecution.warning.splitPanes":"Split Panes: Commands are sent to the pane specified by sessionId, not the focused pane","mcp.backgroundExecution.warning.dangerous":"Dangerous Commands: AI could run destructive commands (rm -rf, etc.) without you noticing immediately","mcp.backgroundExecution.safety.title":"Recommended Safety Measures:","mcp.backgroundExecution.safety.pairProgramming":"Keep \\"Pair Programming Mode\\" enabled with confirmation dialogs","mcp.backgroundExecution.safety.sessionId":"Use sessionId to target specific terminals to avoid accidental cross-terminal execution","mcp.backgroundExecution.safety.monitor":"Monitor terminal buffers periodically via get_terminal_buffer","mcp.sftp.title":"SFTP Settings","mcp.sftp.desc":"SFTP file transfer support (requires tabby-ssh plugin)","mcp.sftp.enable":"Enable SFTP tools","mcp.sftp.enable.desc":"If tabby-ssh is not installed, SFTP tools will be disabled automatically","mcp.sftp.maxReadSize":"Max Read Size","mcp.sftp.maxReadSize.desc":"Maximum file size for sftp_read_file (default: 1 MB)","mcp.sftp.maxUploadSize":"Max Upload Size","mcp.sftp.maxUploadSize.desc":"Maximum file size for sftp_upload (default: 10 GB)","mcp.sftp.maxDownloadSize":"Max Download Size","mcp.sftp.maxDownloadSize.desc":"Maximum file size for sftp_download (default: 10 GB)","mcp.sftp.timeout":"Timeout (seconds)","mcp.sftp.timeout.desc":"SFTP operation timeout (default: 60 seconds)","mcp.sftp.notes.title":"SFTP Notes:","mcp.sftp.notes.binary":"File transfers are direct binary (no base64 encoding)","mcp.sftp.notes.memory":"Large files may consume significant memory during transfer","mcp.sftp.notes.overwrite":"sftp_write_file can overwrite files without confirmation","mcp.sftp.notes.limit":"If file exceeds size limit, MCP will return an error (no popup)","mcp.experimental.title":"Experimental Features","mcp.experimental.streamCapture.label":"Use Stream Capture (Beta)","mcp.experimental.streamCapture.desc":"Solves output truncation issues for long commands by capturing raw data stream instead of screen buffer. Default is OFF (legacy buffer mode).","mcp.experimental.streamCapture.note":"This mode bypasses the terminal screen buffer limit. It is recommended for executing commands that produce large output (e.g., cat large files).","mcp.timing.title":"Timing Settings","mcp.timing.desc":"Advanced timing configuration for command execution and session detection","mcp.timing.pollInterval":"Poll Interval (ms)","mcp.timing.pollInterval.desc":"How often to check for command output (default: 100)","mcp.timing.initialDelay":"Initial Delay (ms)","mcp.timing.initialDelay.desc":"Delay before polling starts (default: 0)","mcp.timing.sessionStableChecks":"Session Stable Checks","mcp.timing.sessionStableChecks.desc":"Number of stable checks for session ready detection (default: 5)","mcp.timing.sessionPollInterval":"Session Poll Interval (ms)","mcp.timing.sessionPollInterval.desc":"Interval for session ready polling (default: 200)","mcp.connectionInfo.title":"Connection Info","mcp.connectionInfo.streamable":"Streamable HTTP (Recommended):","mcp.connectionInfo.legacySse":"Legacy SSE:","mcp.connectionInfo.healthCheck":"Health Check:","mcp.connectionInfo.addToClient":"Add to your MCP client (e.g., Cursor, VS Code):","mcp.connectionInfo.copyConfig":"Copy Config","mcp.common.saved":"✓ Settings saved","mcp.common.mb":"MB","mcp.common.sec":"sec","mcp.about.title":"About","mcp.about.issues":"Report Issues","mcp.about.credit":"Made with ❤️ by AI and GentlemanHu"}');
|
|
68477
|
+
module.exports = /*#__PURE__*/JSON.parse('{"mcp.settings.title":"MCP Server Settings","mcp.settings.version":"v{version}","mcp.server.status":"Server Status","mcp.server.running":"Running","mcp.server.stopped":"Stopped","mcp.server.connections":"{count} connection(s)","mcp.server.start":"Start Server","mcp.server.stop":"Stop Server","mcp.server.restart":"Restart","mcp.config.port":"Port","mcp.config.port.desc":"MCP server port (default: 3001)","mcp.config.startOnBoot":"Start server on Tabby launch","mcp.logging.title":"Logging","mcp.logging.enable":"Enable logging","mcp.logging.level":"Log Level","mcp.logging.level.debug":"Debug","mcp.logging.level.info":"Info","mcp.logging.level.warn":"Warning","mcp.logging.level.error":"Error","mcp.logging.viewLogs":"View Logs","mcp.logging.exportJson":"Export JSON","mcp.logging.clearLogs":"Clear Logs","mcp.pairProgramming.title":"Pair Programming Mode","mcp.pairProgramming.enable":"Enable Pair Programming Mode","mcp.pairProgramming.enable.desc":"When enabled, AI commands require confirmation before execution","mcp.pairProgramming.showDialog":"Show confirmation dialog","mcp.pairProgramming.autoFocus":"Auto-focus terminal on command execution","mcp.sessionTracking.title":"Session Tracking","mcp.sessionTracking.desc":"Configure how sessions and tabs are identified","mcp.sessionTracking.stableIds":"Use stable UUIDs for session identification","mcp.sessionTracking.stableIds.desc":"Sessions get persistent IDs that don\'t change when tabs are reordered","mcp.sessionTracking.profileInfo":"Include profile info in session list","mcp.sessionTracking.pid":"Include process ID in session info","mcp.sessionTracking.cwd":"Include current working directory in session info","mcp.backgroundExecution.title":"Background Execution","mcp.backgroundExecution.desc":"Control whether MCP operations run in the background without switching focus","mcp.backgroundExecution.enable":"Enable Background Execution Mode","mcp.backgroundExecution.enable.desc":"When enabled, AI commands execute without switching focus to the target terminal. You can continue working on other tabs while AI runs commands in the background.","mcp.backgroundExecution.warning.title":"Background Execution Risks:","mcp.backgroundExecution.warning.visibility":"Limited Visibility: You won\'t see commands executing in real-time","mcp.backgroundExecution.warning.conflicts":"Input Conflicts: If you type in the target terminal while AI is running, input will mix and cause errors","mcp.backgroundExecution.warning.splitPanes":"Split Panes: Commands are sent to the pane specified by sessionId, not the focused pane","mcp.backgroundExecution.warning.dangerous":"Dangerous Commands: AI could run destructive commands (rm -rf, etc.) without you noticing immediately","mcp.backgroundExecution.safety.title":"Recommended Safety Measures:","mcp.backgroundExecution.safety.pairProgramming":"Keep \\"Pair Programming Mode\\" enabled with confirmation dialogs","mcp.backgroundExecution.safety.sessionId":"Use sessionId to target specific terminals to avoid accidental cross-terminal execution","mcp.backgroundExecution.safety.monitor":"Monitor terminal buffers periodically via get_terminal_buffer","mcp.sftp.title":"SFTP Settings","mcp.sftp.desc":"SFTP file transfer support (requires tabby-ssh plugin)","mcp.sftp.enable":"Enable SFTP tools","mcp.sftp.enable.desc":"If tabby-ssh is not installed, SFTP tools will be disabled automatically","mcp.sftp.maxReadSize":"Max Read Size","mcp.sftp.maxReadSize.desc":"Maximum file size for sftp_read_file (default: 1 MB)","mcp.sftp.maxUploadSize":"Max Upload Size","mcp.sftp.maxUploadSize.desc":"Maximum file size for sftp_upload (default: 10 GB)","mcp.sftp.maxDownloadSize":"Max Download Size","mcp.sftp.maxDownloadSize.desc":"Maximum file size for sftp_download (default: 10 GB)","mcp.sftp.timeout":"Timeout (seconds)","mcp.sftp.timeout.desc":"SFTP operation timeout (default: 60 seconds)","mcp.sftp.notes.title":"SFTP Notes:","mcp.sftp.notes.binary":"File transfers are direct binary (no base64 encoding)","mcp.sftp.notes.memory":"Large files may consume significant memory during transfer","mcp.sftp.notes.overwrite":"sftp_write_file can overwrite files without confirmation","mcp.sftp.notes.limit":"If file exceeds size limit, MCP will return an error (no popup)","mcp.environmentDetection.title":"Environment Detection","mcp.environmentDetection.desc":"Heuristically infer the current terminal context (shell, Python, database REPL, etc.) before sending commands.","mcp.environmentDetection.enable":"Enable environment detection","mcp.environmentDetection.enable.desc":"Exposes get_session_environment for agents and scripts. Disabled by default for safety and predictability.","mcp.environmentDetection.enhanced":"Use enhanced heuristics","mcp.environmentDetection.enhanced.desc":"Scan recent prompt lines and normalize ANSI/control sequences for better prompt detection.","mcp.environmentDetection.mode":"Detection mode","mcp.environmentDetection.mode.heuristic":"Heuristic (passive)","mcp.environmentDetection.mode.active":"Active probe (stronger)","mcp.environmentDetection.mode.desc":"Active mode adds low-risk probing for shell sessions to improve accuracy, but it may still be affected by interactive state or shell policies.","mcp.environmentDetection.warning.title":"Environment detection limitations:","mcp.environmentDetection.warning.heuristic":"This feature is heuristic-based and may be inaccurate for custom prompts or uncommon interactive tools.","mcp.environmentDetection.warning.transient":"Transient SSH/status lines may appear before the real prompt and affect interpretation.","mcp.environmentDetection.warning.customPrompt":"Database or REPL detection depends on recognizable prompts; heavily customized prompts can reduce accuracy.","mcp.environmentDetection.warning.verify":"For critical actions, verify with get_terminal_buffer or a manual command before performing destructive operations.","mcp.environmentDetection.restart.confirm":"Environment Detection tool visibility changed. Restart the MCP server now to refresh the available tool list for current clients? Existing MCP connections may need to reconnect.","mcp.environmentDetection.restart.done":"✓ Settings saved and MCP server restarted","mcp.environmentDetection.restart.later":"✓ Settings saved. Existing MCP clients may need to reconnect before the tool list updates.","mcp.experimental.title":"Experimental Features","mcp.experimental.streamCapture.label":"Use Stream Capture (Beta)","mcp.experimental.streamCapture.desc":"Solves output truncation issues for long commands by capturing raw data stream instead of screen buffer. Default is OFF (legacy buffer mode).","mcp.experimental.streamCapture.note":"This mode bypasses the terminal screen buffer limit. It is recommended for executing commands that produce large output (e.g., cat large files).","mcp.timing.title":"Timing Settings","mcp.timing.desc":"Advanced timing configuration for command execution and session detection","mcp.timing.pollInterval":"Poll Interval (ms)","mcp.timing.pollInterval.desc":"How often to check for command output (default: 100)","mcp.timing.initialDelay":"Initial Delay (ms)","mcp.timing.initialDelay.desc":"Delay before polling starts (default: 0)","mcp.timing.sessionStableChecks":"Session Stable Checks","mcp.timing.sessionStableChecks.desc":"Number of stable checks for session ready detection (default: 5)","mcp.timing.sessionPollInterval":"Session Poll Interval (ms)","mcp.timing.sessionPollInterval.desc":"Interval for session ready polling (default: 200)","mcp.connectionInfo.title":"Connection Info","mcp.connectionInfo.streamable":"Streamable HTTP (Recommended):","mcp.connectionInfo.legacySse":"Legacy SSE:","mcp.connectionInfo.healthCheck":"Health Check:","mcp.connectionInfo.addToClient":"Add to your MCP client (e.g., Cursor, VS Code):","mcp.connectionInfo.copyConfig":"Copy Config","mcp.common.saved":"✓ Settings saved","mcp.common.mb":"MB","mcp.common.sec":"sec","mcp.about.title":"About","mcp.about.issues":"Report Issues","mcp.about.credit":"Made with ❤️ by AI and GentlemanHu"}');
|
|
67616
68478
|
|
|
67617
68479
|
/***/ },
|
|
67618
68480
|
|
|
@@ -67620,7 +68482,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"mcp.settings.title":"MCP Server Sett
|
|
|
67620
68482
|
(module) {
|
|
67621
68483
|
|
|
67622
68484
|
"use strict";
|
|
67623
|
-
module.exports = /*#__PURE__*/JSON.parse('{"mcp.settings.title":"MCP 服务器设置","mcp.settings.version":"v{version}","mcp.server.status":"服务器状态","mcp.server.running":"运行中","mcp.server.stopped":"已停止","mcp.server.connections":"{count} 个连接","mcp.server.start":"启动服务器","mcp.server.stop":"停止服务器","mcp.server.restart":"重启","mcp.config.port":"端口","mcp.config.port.desc":"MCP 服务器端口(默认:3001)","mcp.config.startOnBoot":"Tabby 启动时自动启动服务器","mcp.logging.title":"日志","mcp.logging.enable":"启用日志","mcp.logging.level":"日志级别","mcp.logging.level.debug":"调试","mcp.logging.level.info":"信息","mcp.logging.level.warn":"警告","mcp.logging.level.error":"错误","mcp.logging.viewLogs":"查看日志","mcp.logging.exportJson":"导出 JSON","mcp.logging.clearLogs":"清空日志","mcp.pairProgramming.title":"结对编程模式","mcp.pairProgramming.enable":"启用结对编程模式","mcp.pairProgramming.enable.desc":"启用后,AI 命令执行前需要确认","mcp.pairProgramming.showDialog":"显示确认对话框","mcp.pairProgramming.autoFocus":"执行命令时自动聚焦终端","mcp.sessionTracking.title":"会话跟踪","mcp.sessionTracking.desc":"配置会话和标签页的识别方式","mcp.sessionTracking.stableIds":"使用稳定的 UUID 识别会话","mcp.sessionTracking.stableIds.desc":"会话获得持久 ID,标签页重新排序时不会改变","mcp.sessionTracking.profileInfo":"在会话列表中包含配置文件信息","mcp.sessionTracking.pid":"在会话信息中包含进程 ID","mcp.sessionTracking.cwd":"在会话信息中包含当前工作目录","mcp.backgroundExecution.title":"后台执行","mcp.backgroundExecution.desc":"控制 MCP 操作是否在后台运行而不切换焦点","mcp.backgroundExecution.enable":"启用后台执行模式","mcp.backgroundExecution.enable.desc":"启用后,AI 命令执行时不会切换到目标终端。你可以继续在其他标签页工作,同时 AI 在后台执行命令。","mcp.backgroundExecution.warning.title":"后台执行风险:","mcp.backgroundExecution.warning.visibility":"可见性受限:你无法实时看到命令执行过程","mcp.backgroundExecution.warning.conflicts":"输入冲突:如果你在目标终端输入时 AI 也在执行命令,输入会混乱导致错误","mcp.backgroundExecution.warning.splitPanes":"分割窗格:命令发送到 sessionId 指定的窗格,而非聚焦的窗格","mcp.backgroundExecution.warning.dangerous":"危险命令:AI 可能在你不注意时执行破坏性命令(rm -rf 等)","mcp.backgroundExecution.safety.title":"建议的安全措施:","mcp.backgroundExecution.safety.pairProgramming":"保持「结对编程模式」开启并启用确认对话框","mcp.backgroundExecution.safety.sessionId":"使用 sessionId 指定目标终端,避免跨终端误操作","mcp.backgroundExecution.safety.monitor":"定期通过 get_terminal_buffer 监控终端缓冲区","mcp.sftp.title":"SFTP 设置","mcp.sftp.desc":"SFTP 文件传输支持(需要 tabby-ssh 插件)","mcp.sftp.enable":"启用 SFTP 工具","mcp.sftp.enable.desc":"如果未安装 tabby-ssh,SFTP 工具将自动禁用","mcp.sftp.maxReadSize":"最大读取大小","mcp.sftp.maxReadSize.desc":"sftp_read_file 的最大文件大小(默认:1 MB)","mcp.sftp.maxUploadSize":"最大上传大小","mcp.sftp.maxUploadSize.desc":"sftp_upload 的最大文件大小(默认:10 GB)","mcp.sftp.maxDownloadSize":"最大下载大小","mcp.sftp.maxDownloadSize.desc":"sftp_download 的最大文件大小(默认:10 GB)","mcp.sftp.timeout":"超时时间(秒)","mcp.sftp.timeout.desc":"SFTP 操作超时(默认:60 秒)","mcp.sftp.notes.title":"SFTP 说明:","mcp.sftp.notes.binary":"文件传输为直接二进制(无 base64 编码)","mcp.sftp.notes.memory":"大文件传输时可能消耗大量内存","mcp.sftp.notes.overwrite":"sftp_write_file 可能在无确认的情况下覆盖文件","mcp.sftp.notes.limit":"如果文件超过大小限制,MCP 将返回错误(无弹窗)","mcp.experimental.title":"实验性功能","mcp.experimental.streamCapture.label":"使用流式捕获 (Beta)","mcp.experimental.streamCapture.desc":"通过直接捕获数据流解决长命令输出截断问题(绕过屏幕缓冲区)。默认为关闭(传统模式)。","mcp.experimental.streamCapture.note":"此模式绕过终端屏幕缓冲区限制。建议用于执行产生大量输出的命令(例如 cat 大文件)。","mcp.timing.title":"时间设置","mcp.timing.desc":"命令执行和会话检测的高级时间配置","mcp.timing.pollInterval":"轮询间隔(毫秒)","mcp.timing.pollInterval.desc":"检查命令输出的频率(默认:100)","mcp.timing.initialDelay":"初始延迟(毫秒)","mcp.timing.initialDelay.desc":"开始轮询前的延迟(默认:0)","mcp.timing.sessionStableChecks":"会话稳定检查次数","mcp.timing.sessionStableChecks.desc":"会话就绪检测的稳定检查次数(默认:5)","mcp.timing.sessionPollInterval":"会话轮询间隔(毫秒)","mcp.timing.sessionPollInterval.desc":"会话就绪轮询的间隔(默认:200)","mcp.connectionInfo.title":"连接信息","mcp.connectionInfo.streamable":"Streamable HTTP(推荐):","mcp.connectionInfo.legacySse":"Legacy SSE:","mcp.connectionInfo.healthCheck":"健康检查:","mcp.connectionInfo.addToClient":"添加到你的 MCP 客户端(如 Cursor、VS Code):","mcp.connectionInfo.copyConfig":"复制配置","mcp.common.saved":"✓ 设置已保存","mcp.common.mb":"MB","mcp.common.sec":"秒"}');
|
|
68485
|
+
module.exports = /*#__PURE__*/JSON.parse('{"mcp.settings.title":"MCP 服务器设置","mcp.settings.version":"v{version}","mcp.server.status":"服务器状态","mcp.server.running":"运行中","mcp.server.stopped":"已停止","mcp.server.connections":"{count} 个连接","mcp.server.start":"启动服务器","mcp.server.stop":"停止服务器","mcp.server.restart":"重启","mcp.config.port":"端口","mcp.config.port.desc":"MCP 服务器端口(默认:3001)","mcp.config.startOnBoot":"Tabby 启动时自动启动服务器","mcp.logging.title":"日志","mcp.logging.enable":"启用日志","mcp.logging.level":"日志级别","mcp.logging.level.debug":"调试","mcp.logging.level.info":"信息","mcp.logging.level.warn":"警告","mcp.logging.level.error":"错误","mcp.logging.viewLogs":"查看日志","mcp.logging.exportJson":"导出 JSON","mcp.logging.clearLogs":"清空日志","mcp.pairProgramming.title":"结对编程模式","mcp.pairProgramming.enable":"启用结对编程模式","mcp.pairProgramming.enable.desc":"启用后,AI 命令执行前需要确认","mcp.pairProgramming.showDialog":"显示确认对话框","mcp.pairProgramming.autoFocus":"执行命令时自动聚焦终端","mcp.sessionTracking.title":"会话跟踪","mcp.sessionTracking.desc":"配置会话和标签页的识别方式","mcp.sessionTracking.stableIds":"使用稳定的 UUID 识别会话","mcp.sessionTracking.stableIds.desc":"会话获得持久 ID,标签页重新排序时不会改变","mcp.sessionTracking.profileInfo":"在会话列表中包含配置文件信息","mcp.sessionTracking.pid":"在会话信息中包含进程 ID","mcp.sessionTracking.cwd":"在会话信息中包含当前工作目录","mcp.backgroundExecution.title":"后台执行","mcp.backgroundExecution.desc":"控制 MCP 操作是否在后台运行而不切换焦点","mcp.backgroundExecution.enable":"启用后台执行模式","mcp.backgroundExecution.enable.desc":"启用后,AI 命令执行时不会切换到目标终端。你可以继续在其他标签页工作,同时 AI 在后台执行命令。","mcp.backgroundExecution.warning.title":"后台执行风险:","mcp.backgroundExecution.warning.visibility":"可见性受限:你无法实时看到命令执行过程","mcp.backgroundExecution.warning.conflicts":"输入冲突:如果你在目标终端输入时 AI 也在执行命令,输入会混乱导致错误","mcp.backgroundExecution.warning.splitPanes":"分割窗格:命令发送到 sessionId 指定的窗格,而非聚焦的窗格","mcp.backgroundExecution.warning.dangerous":"危险命令:AI 可能在你不注意时执行破坏性命令(rm -rf 等)","mcp.backgroundExecution.safety.title":"建议的安全措施:","mcp.backgroundExecution.safety.pairProgramming":"保持「结对编程模式」开启并启用确认对话框","mcp.backgroundExecution.safety.sessionId":"使用 sessionId 指定目标终端,避免跨终端误操作","mcp.backgroundExecution.safety.monitor":"定期通过 get_terminal_buffer 监控终端缓冲区","mcp.sftp.title":"SFTP 设置","mcp.sftp.desc":"SFTP 文件传输支持(需要 tabby-ssh 插件)","mcp.sftp.enable":"启用 SFTP 工具","mcp.sftp.enable.desc":"如果未安装 tabby-ssh,SFTP 工具将自动禁用","mcp.sftp.maxReadSize":"最大读取大小","mcp.sftp.maxReadSize.desc":"sftp_read_file 的最大文件大小(默认:1 MB)","mcp.sftp.maxUploadSize":"最大上传大小","mcp.sftp.maxUploadSize.desc":"sftp_upload 的最大文件大小(默认:10 GB)","mcp.sftp.maxDownloadSize":"最大下载大小","mcp.sftp.maxDownloadSize.desc":"sftp_download 的最大文件大小(默认:10 GB)","mcp.sftp.timeout":"超时时间(秒)","mcp.sftp.timeout.desc":"SFTP 操作超时(默认:60 秒)","mcp.sftp.notes.title":"SFTP 说明:","mcp.sftp.notes.binary":"文件传输为直接二进制(无 base64 编码)","mcp.sftp.notes.memory":"大文件传输时可能消耗大量内存","mcp.sftp.notes.overwrite":"sftp_write_file 可能在无确认的情况下覆盖文件","mcp.sftp.notes.limit":"如果文件超过大小限制,MCP 将返回错误(无弹窗)","mcp.environmentDetection.title":"环境探测","mcp.environmentDetection.desc":"在发送命令前,基于启发式方法推断当前终端上下文(Shell、Python、数据库 REPL 等)。","mcp.environmentDetection.enable":"启用环境探测","mcp.environmentDetection.enable.desc":"向智能体和脚本暴露 get_session_environment。默认关闭,以保证安全和可预测性。","mcp.environmentDetection.enhanced":"使用增强启发式探测","mcp.environmentDetection.enhanced.desc":"扫描最近的提示符行,并规范化 ANSI/控制序列,以提高提示符识别准确率。","mcp.environmentDetection.mode":"探测模式","mcp.environmentDetection.mode.heuristic":"启发式(被动)","mcp.environmentDetection.mode.active":"主动探测(更强)","mcp.environmentDetection.mode.desc":"主动模式会在 shell 会话中增加低风险探针以提高准确率,但仍可能受到交互状态或 shell 策略影响。","mcp.environmentDetection.warning.title":"环境探测限制:","mcp.environmentDetection.warning.heuristic":"该功能基于启发式判断;对于自定义 prompt 或不常见的交互工具,可能不准确。","mcp.environmentDetection.warning.transient":"SSH 登录提示或临时状态行可能出现在真正 prompt 之前,影响判断结果。","mcp.environmentDetection.warning.customPrompt":"数据库或 REPL 的识别依赖可辨认的提示符;高度自定义的 prompt 会降低准确率。","mcp.environmentDetection.warning.verify":"对于关键操作,请先结合 get_terminal_buffer 或手动命令确认,再执行可能有破坏性的动作。","mcp.environmentDetection.restart.confirm":"环境探测工具的可见性已改变。是否现在重启 MCP 服务器,以刷新当前客户端看到的工具列表?现有 MCP 连接可能需要重新连接。","mcp.environmentDetection.restart.done":"✓ 设置已保存,并已重启 MCP 服务器","mcp.environmentDetection.restart.later":"✓ 设置已保存。现有 MCP 客户端可能需要重新连接后才能看到更新后的工具列表。","mcp.experimental.title":"实验性功能","mcp.experimental.streamCapture.label":"使用流式捕获 (Beta)","mcp.experimental.streamCapture.desc":"通过直接捕获数据流解决长命令输出截断问题(绕过屏幕缓冲区)。默认为关闭(传统模式)。","mcp.experimental.streamCapture.note":"此模式绕过终端屏幕缓冲区限制。建议用于执行产生大量输出的命令(例如 cat 大文件)。","mcp.timing.title":"时间设置","mcp.timing.desc":"命令执行和会话检测的高级时间配置","mcp.timing.pollInterval":"轮询间隔(毫秒)","mcp.timing.pollInterval.desc":"检查命令输出的频率(默认:100)","mcp.timing.initialDelay":"初始延迟(毫秒)","mcp.timing.initialDelay.desc":"开始轮询前的延迟(默认:0)","mcp.timing.sessionStableChecks":"会话稳定检查次数","mcp.timing.sessionStableChecks.desc":"会话就绪检测的稳定检查次数(默认:5)","mcp.timing.sessionPollInterval":"会话轮询间隔(毫秒)","mcp.timing.sessionPollInterval.desc":"会话就绪轮询的间隔(默认:200)","mcp.connectionInfo.title":"连接信息","mcp.connectionInfo.streamable":"Streamable HTTP(推荐):","mcp.connectionInfo.legacySse":"Legacy SSE:","mcp.connectionInfo.healthCheck":"健康检查:","mcp.connectionInfo.addToClient":"添加到你的 MCP 客户端(如 Cursor、VS Code):","mcp.connectionInfo.copyConfig":"复制配置","mcp.common.saved":"✓ 设置已保存","mcp.common.mb":"MB","mcp.common.sec":"秒"}');
|
|
67624
68486
|
|
|
67625
68487
|
/***/ }
|
|
67626
68488
|
|