mcp-ts-template 3.0.5 → 3.0.7
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 +1 -1
- package/dist/index.js +215 -179
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-11-25/changelog.mdx) [](https://modelcontextprotocol.io/) [](./LICENSE)
|
|
11
11
|
|
|
12
12
|
[](https://github.com/cyanheads/mcp-ts-template/issues) [](https://www.typescriptlang.org/) [](https://bun.sh/) [](./coverage/index.html)
|
|
13
13
|
|
package/dist/index.js
CHANGED
|
@@ -25830,7 +25830,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
25830
25830
|
return n;
|
|
25831
25831
|
}
|
|
25832
25832
|
function parseMailtoQueryString(queryString) {
|
|
25833
|
-
var allowedParams = new Set(["subject", "body", "cc", "bcc"]),
|
|
25833
|
+
var allowedParams = new Set(["subject", "body", "cc", "bcc"]), query2 = {
|
|
25834
25834
|
cc: "",
|
|
25835
25835
|
bcc: ""
|
|
25836
25836
|
};
|
|
@@ -25849,7 +25849,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
25849
25849
|
break;
|
|
25850
25850
|
}
|
|
25851
25851
|
if (value && (key === "cc" || key === "bcc")) {
|
|
25852
|
-
|
|
25852
|
+
query2[key] = value;
|
|
25853
25853
|
}
|
|
25854
25854
|
if (key) {
|
|
25855
25855
|
allowedParams.delete(key);
|
|
@@ -25860,7 +25860,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
25860
25860
|
} finally {
|
|
25861
25861
|
_iterator.f();
|
|
25862
25862
|
}
|
|
25863
|
-
return isParseFailed ? false :
|
|
25863
|
+
return isParseFailed ? false : query2;
|
|
25864
25864
|
}
|
|
25865
25865
|
function isMailtoURI(url2, options) {
|
|
25866
25866
|
(0, _assertString.default)(url2);
|
|
@@ -25871,11 +25871,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
25871
25871
|
if (!to && !queryString) {
|
|
25872
25872
|
return true;
|
|
25873
25873
|
}
|
|
25874
|
-
var
|
|
25875
|
-
if (!
|
|
25874
|
+
var query2 = parseMailtoQueryString(queryString);
|
|
25875
|
+
if (!query2) {
|
|
25876
25876
|
return false;
|
|
25877
25877
|
}
|
|
25878
|
-
return "".concat(to, ",").concat(
|
|
25878
|
+
return "".concat(to, ",").concat(query2.cc, ",").concat(query2.bcc).split(",").every(function(email3) {
|
|
25879
25879
|
email3 = (0, _trim2.default)(email3, " ");
|
|
25880
25880
|
if (email3) {
|
|
25881
25881
|
return (0, _isEmail.default)(email3, options);
|
|
@@ -30314,9 +30314,9 @@ var require_schemes = __commonJS((exports, module) => {
|
|
|
30314
30314
|
wsComponent.secure = undefined;
|
|
30315
30315
|
}
|
|
30316
30316
|
if (wsComponent.resourceName) {
|
|
30317
|
-
const [path3,
|
|
30317
|
+
const [path3, query2] = wsComponent.resourceName.split("?");
|
|
30318
30318
|
wsComponent.path = path3 && path3 !== "/" ? path3 : undefined;
|
|
30319
|
-
wsComponent.query =
|
|
30319
|
+
wsComponent.query = query2;
|
|
30320
30320
|
wsComponent.resourceName = undefined;
|
|
30321
30321
|
}
|
|
30322
30322
|
wsComponent.fragment = undefined;
|
|
@@ -47745,7 +47745,7 @@ var require_sqs = __commonJS((exports) => {
|
|
|
47745
47745
|
var MessageAttributes_1 = require_MessageAttributes();
|
|
47746
47746
|
|
|
47747
47747
|
class SqsServiceExtension {
|
|
47748
|
-
requestPreSpanHook(request,
|
|
47748
|
+
requestPreSpanHook(request, _config2) {
|
|
47749
47749
|
const queueUrl = this.extractQueueUrl(request.commandInput);
|
|
47750
47750
|
const queueName = this.extractQueueNameFromUrl(queueUrl);
|
|
47751
47751
|
let spanKind = api_1.SpanKind.CLIENT;
|
|
@@ -48481,7 +48481,7 @@ var require_dynamodb = __commonJS((exports) => {
|
|
|
48481
48481
|
spanName
|
|
48482
48482
|
};
|
|
48483
48483
|
}
|
|
48484
|
-
responseHook(response, span, _tracer,
|
|
48484
|
+
responseHook(response, span, _tracer, _config2) {
|
|
48485
48485
|
if (response.data?.ConsumedCapacity) {
|
|
48486
48486
|
span.setAttribute(semconv_1.ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY, toArray(response.data.ConsumedCapacity).map((x2) => JSON.stringify(x2)));
|
|
48487
48487
|
}
|
|
@@ -48513,7 +48513,7 @@ var require_secretsmanager = __commonJS((exports) => {
|
|
|
48513
48513
|
var semconv_1 = require_semconv4();
|
|
48514
48514
|
|
|
48515
48515
|
class SecretsManagerServiceExtension {
|
|
48516
|
-
requestPreSpanHook(request,
|
|
48516
|
+
requestPreSpanHook(request, _config2) {
|
|
48517
48517
|
const secretId = request.commandInput?.SecretId;
|
|
48518
48518
|
const spanKind = api_1.SpanKind.CLIENT;
|
|
48519
48519
|
let spanName;
|
|
@@ -48559,7 +48559,7 @@ var require_sns = __commonJS((exports) => {
|
|
|
48559
48559
|
var MessageAttributes_1 = require_MessageAttributes();
|
|
48560
48560
|
|
|
48561
48561
|
class SnsServiceExtension {
|
|
48562
|
-
requestPreSpanHook(request,
|
|
48562
|
+
requestPreSpanHook(request, _config2) {
|
|
48563
48563
|
let spanKind = api_1.SpanKind.CLIENT;
|
|
48564
48564
|
let spanName = `SNS ${request.commandName}`;
|
|
48565
48565
|
const spanAttributes = {
|
|
@@ -48624,7 +48624,7 @@ var require_stepfunctions = __commonJS((exports) => {
|
|
|
48624
48624
|
var semconv_1 = require_semconv4();
|
|
48625
48625
|
|
|
48626
48626
|
class StepFunctionsServiceExtension {
|
|
48627
|
-
requestPreSpanHook(request,
|
|
48627
|
+
requestPreSpanHook(request, _config2) {
|
|
48628
48628
|
const stateMachineArn = request.commandInput?.stateMachineArn;
|
|
48629
48629
|
const activityArn = request.commandInput?.activityArn;
|
|
48630
48630
|
const spanKind = api_1.SpanKind.CLIENT;
|
|
@@ -48659,7 +48659,7 @@ var require_lambda = __commonJS((exports) => {
|
|
|
48659
48659
|
}
|
|
48660
48660
|
|
|
48661
48661
|
class LambdaServiceExtension {
|
|
48662
|
-
requestPreSpanHook(request,
|
|
48662
|
+
requestPreSpanHook(request, _config2) {
|
|
48663
48663
|
const functionName = this.extractFunctionName(request.commandInput);
|
|
48664
48664
|
let spanAttributes = {};
|
|
48665
48665
|
let spanName;
|
|
@@ -48740,7 +48740,7 @@ var require_s3 = __commonJS((exports) => {
|
|
|
48740
48740
|
var enums_1 = require_enums();
|
|
48741
48741
|
|
|
48742
48742
|
class S3ServiceExtension {
|
|
48743
|
-
requestPreSpanHook(request,
|
|
48743
|
+
requestPreSpanHook(request, _config2) {
|
|
48744
48744
|
const bucketName = request.commandInput?.Bucket;
|
|
48745
48745
|
const spanKind = api_1.SpanKind.CLIENT;
|
|
48746
48746
|
const spanAttributes = {};
|
|
@@ -48766,7 +48766,7 @@ var require_kinesis = __commonJS((exports) => {
|
|
|
48766
48766
|
var enums_1 = require_enums();
|
|
48767
48767
|
|
|
48768
48768
|
class KinesisServiceExtension {
|
|
48769
|
-
requestPreSpanHook(request,
|
|
48769
|
+
requestPreSpanHook(request, _config2) {
|
|
48770
48770
|
const streamName = request.commandInput?.StreamName;
|
|
48771
48771
|
const spanKind = api_1.SpanKind.CLIENT;
|
|
48772
48772
|
const spanAttributes = {};
|
|
@@ -49701,7 +49701,7 @@ var require_instrumentation5 = __commonJS((exports) => {
|
|
|
49701
49701
|
};
|
|
49702
49702
|
};
|
|
49703
49703
|
}
|
|
49704
|
-
startSpan({ op, query }, client2) {
|
|
49704
|
+
startSpan({ op, query: query2 }, client2) {
|
|
49705
49705
|
const attributes = {};
|
|
49706
49706
|
if (this._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
49707
49707
|
attributes[semconv_1.ATTR_DB_SYSTEM] = semconv_1.DB_SYSTEM_VALUE_CASSANDRA;
|
|
@@ -49709,8 +49709,8 @@ var require_instrumentation5 = __commonJS((exports) => {
|
|
|
49709
49709
|
if (this._dbSemconvStability & instrumentation_1.SemconvStability.STABLE) {
|
|
49710
49710
|
attributes[semantic_conventions_1.ATTR_DB_SYSTEM_NAME] = semconv_1.DB_SYSTEM_NAME_VALUE_CASSANDRA;
|
|
49711
49711
|
}
|
|
49712
|
-
if (this._shouldIncludeDbStatement() &&
|
|
49713
|
-
const statement = truncateQuery(
|
|
49712
|
+
if (this._shouldIncludeDbStatement() && query2 !== undefined) {
|
|
49713
|
+
const statement = truncateQuery(query2, this._getMaxQueryLength());
|
|
49714
49714
|
if (this._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
49715
49715
|
attributes[semconv_1.ATTR_DB_STATEMENT] = statement;
|
|
49716
49716
|
}
|
|
@@ -49757,7 +49757,7 @@ var require_instrumentation5 = __commonJS((exports) => {
|
|
|
49757
49757
|
span.end();
|
|
49758
49758
|
}
|
|
49759
49759
|
function combineQueries(queries) {
|
|
49760
|
-
return queries.map((
|
|
49760
|
+
return queries.map((query2) => typeof query2 === "string" ? query2 : query2.query).join(`
|
|
49761
49761
|
`);
|
|
49762
49762
|
}
|
|
49763
49763
|
function wrapPromise(span, promise3, successCallback) {
|
|
@@ -49781,8 +49781,8 @@ var require_instrumentation5 = __commonJS((exports) => {
|
|
|
49781
49781
|
});
|
|
49782
49782
|
});
|
|
49783
49783
|
}
|
|
49784
|
-
function truncateQuery(
|
|
49785
|
-
return String(
|
|
49784
|
+
function truncateQuery(query2, maxQueryLength) {
|
|
49785
|
+
return String(query2).substring(0, maxQueryLength);
|
|
49786
49786
|
}
|
|
49787
49787
|
});
|
|
49788
49788
|
|
|
@@ -56010,10 +56010,10 @@ var require_instrumentation19 = __commonJS((exports) => {
|
|
|
56010
56010
|
createQueryWrapper(moduleVersion) {
|
|
56011
56011
|
const instrumentation = this;
|
|
56012
56012
|
return function wrapQuery(original) {
|
|
56013
|
-
return function wrapped_logging_method(
|
|
56013
|
+
return function wrapped_logging_method(query2) {
|
|
56014
56014
|
const config3 = this.client.config;
|
|
56015
56015
|
const table = utils.extractTableName(this.builder);
|
|
56016
|
-
const operation =
|
|
56016
|
+
const operation = query2?.method;
|
|
56017
56017
|
const name2 = config3?.connection?.filename || config3?.connection?.database;
|
|
56018
56018
|
const { maxQueryLength } = instrumentation.getConfig();
|
|
56019
56019
|
const attributes = {
|
|
@@ -56043,7 +56043,7 @@ var require_instrumentation19 = __commonJS((exports) => {
|
|
|
56043
56043
|
});
|
|
56044
56044
|
}
|
|
56045
56045
|
if (maxQueryLength) {
|
|
56046
|
-
const queryText = utils.limitLength(
|
|
56046
|
+
const queryText = utils.limitLength(query2?.sql, maxQueryLength);
|
|
56047
56047
|
if (instrumentation._semconvStability & instrumentation_1.SemconvStability.STABLE) {
|
|
56048
56048
|
attributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] = queryText;
|
|
56049
56049
|
}
|
|
@@ -56067,7 +56067,7 @@ var require_instrumentation19 = __commonJS((exports) => {
|
|
|
56067
56067
|
return result;
|
|
56068
56068
|
}).catch((err) => {
|
|
56069
56069
|
const formatter = utils.getFormatter(this);
|
|
56070
|
-
const fullQuery = formatter(
|
|
56070
|
+
const fullQuery = formatter(query2.sql, query2.bindings || []);
|
|
56071
56071
|
const message2 = err.message.replace(fullQuery + " - ", "");
|
|
56072
56072
|
const exc = utils.otelExceptionFromKnexError(err, message2);
|
|
56073
56073
|
span.recordException(exc);
|
|
@@ -56380,18 +56380,18 @@ var require_utils21 = __commonJS((exports) => {
|
|
|
56380
56380
|
var semconv_1 = require_semconv12();
|
|
56381
56381
|
var semantic_conventions_1 = require_src2();
|
|
56382
56382
|
var instrumentation_1 = require_src6();
|
|
56383
|
-
var getPeerAttributes = (client2, server2,
|
|
56383
|
+
var getPeerAttributes = (client2, server2, query2, netSemconvStability) => {
|
|
56384
56384
|
if (!server2) {
|
|
56385
56385
|
if (client2.servers.length === 1) {
|
|
56386
56386
|
server2 = client2.servers[0];
|
|
56387
56387
|
} else {
|
|
56388
56388
|
let redundancy = client2.redundancy && client2.redundancy < client2.servers.length;
|
|
56389
|
-
const queryRedundancy =
|
|
56389
|
+
const queryRedundancy = query2.redundancyEnabled;
|
|
56390
56390
|
if (redundancy && queryRedundancy) {
|
|
56391
|
-
redundancy = client2.HashRing.range(
|
|
56391
|
+
redundancy = client2.HashRing.range(query2.key, client2.redundancy + 1, true);
|
|
56392
56392
|
server2 = redundancy.shift();
|
|
56393
56393
|
} else {
|
|
56394
|
-
server2 = client2.HashRing.get(
|
|
56394
|
+
server2 = client2.HashRing.get(query2.key);
|
|
56395
56395
|
}
|
|
56396
56396
|
}
|
|
56397
56397
|
}
|
|
@@ -56509,30 +56509,30 @@ var require_instrumentation22 = __commonJS((exports) => {
|
|
|
56509
56509
|
wrapQueryCompiler(original, client2, server2, callbackContext, span) {
|
|
56510
56510
|
const instrumentation = this;
|
|
56511
56511
|
return function() {
|
|
56512
|
-
const
|
|
56513
|
-
const callback =
|
|
56514
|
-
span.updateName(`memcached ${
|
|
56512
|
+
const query2 = original.apply(this, arguments);
|
|
56513
|
+
const callback = query2.callback;
|
|
56514
|
+
span.updateName(`memcached ${query2.type}`);
|
|
56515
56515
|
const attributes = {
|
|
56516
|
-
"db.memcached.key":
|
|
56517
|
-
"db.memcached.lifetime":
|
|
56518
|
-
...utils.getPeerAttributes(client2, server2,
|
|
56516
|
+
"db.memcached.key": query2.key,
|
|
56517
|
+
"db.memcached.lifetime": query2.lifetime,
|
|
56518
|
+
...utils.getPeerAttributes(client2, server2, query2, instrumentation._netSemconvStability)
|
|
56519
56519
|
};
|
|
56520
56520
|
if (instrumentation._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
56521
|
-
attributes[semconv_1.ATTR_DB_OPERATION] =
|
|
56521
|
+
attributes[semconv_1.ATTR_DB_OPERATION] = query2.type;
|
|
56522
56522
|
}
|
|
56523
56523
|
if (instrumentation._dbSemconvStability & instrumentation_1.SemconvStability.STABLE) {
|
|
56524
|
-
attributes[semantic_conventions_1.ATTR_DB_OPERATION_NAME] =
|
|
56524
|
+
attributes[semantic_conventions_1.ATTR_DB_OPERATION_NAME] = query2.type;
|
|
56525
56525
|
}
|
|
56526
56526
|
if (instrumentation.getConfig().enhancedDatabaseReporting) {
|
|
56527
56527
|
if (instrumentation._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
56528
|
-
attributes[semconv_1.ATTR_DB_STATEMENT] =
|
|
56528
|
+
attributes[semconv_1.ATTR_DB_STATEMENT] = query2.command;
|
|
56529
56529
|
}
|
|
56530
56530
|
if (instrumentation._dbSemconvStability & instrumentation_1.SemconvStability.STABLE) {
|
|
56531
|
-
attributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] =
|
|
56531
|
+
attributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] = query2.command;
|
|
56532
56532
|
}
|
|
56533
56533
|
}
|
|
56534
56534
|
span.setAttributes(attributes);
|
|
56535
|
-
|
|
56535
|
+
query2.callback = api2.context.bind(callbackContext, function(err) {
|
|
56536
56536
|
if (err) {
|
|
56537
56537
|
span.recordException(err);
|
|
56538
56538
|
span.setStatus({
|
|
@@ -56545,7 +56545,7 @@ var require_instrumentation22 = __commonJS((exports) => {
|
|
|
56545
56545
|
return callback.apply(this, arguments);
|
|
56546
56546
|
}
|
|
56547
56547
|
});
|
|
56548
|
-
return
|
|
56548
|
+
return query2;
|
|
56549
56549
|
};
|
|
56550
56550
|
}
|
|
56551
56551
|
ensureWrapped(obj, methodName, wrapper) {
|
|
@@ -57109,12 +57109,12 @@ var require_instrumentation23 = __commonJS((exports) => {
|
|
|
57109
57109
|
const { dbStatementSerializer: configDbStatementSerializer } = this.getConfig();
|
|
57110
57110
|
const dbStatementSerializer = typeof configDbStatementSerializer === "function" ? configDbStatementSerializer : this._defaultDbStatementSerializer.bind(this);
|
|
57111
57111
|
(0, instrumentation_1.safeExecuteInTheMiddle)(() => {
|
|
57112
|
-
const
|
|
57112
|
+
const query2 = dbStatementSerializer(commandObj);
|
|
57113
57113
|
if (this._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
57114
|
-
attributes[semconv_1.ATTR_DB_STATEMENT] =
|
|
57114
|
+
attributes[semconv_1.ATTR_DB_STATEMENT] = query2;
|
|
57115
57115
|
}
|
|
57116
57116
|
if (this._dbSemconvStability & instrumentation_1.SemconvStability.STABLE) {
|
|
57117
|
-
attributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] =
|
|
57117
|
+
attributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] = query2;
|
|
57118
57118
|
}
|
|
57119
57119
|
}, (err) => {
|
|
57120
57120
|
if (err) {
|
|
@@ -60572,40 +60572,40 @@ var require_src35 = __commonJS((exports) => {
|
|
|
60572
60572
|
exports.addSqlCommenterComment = undefined;
|
|
60573
60573
|
var api_1 = require_src();
|
|
60574
60574
|
var core_1 = require_src34();
|
|
60575
|
-
function hasValidSqlComment(
|
|
60576
|
-
const indexOpeningDashDashComment =
|
|
60575
|
+
function hasValidSqlComment(query2) {
|
|
60576
|
+
const indexOpeningDashDashComment = query2.indexOf("--");
|
|
60577
60577
|
if (indexOpeningDashDashComment >= 0) {
|
|
60578
60578
|
return true;
|
|
60579
60579
|
}
|
|
60580
|
-
const indexOpeningSlashComment =
|
|
60580
|
+
const indexOpeningSlashComment = query2.indexOf("/*");
|
|
60581
60581
|
if (indexOpeningSlashComment < 0) {
|
|
60582
60582
|
return false;
|
|
60583
60583
|
}
|
|
60584
|
-
const indexClosingSlashComment =
|
|
60584
|
+
const indexClosingSlashComment = query2.indexOf("*/");
|
|
60585
60585
|
return indexOpeningDashDashComment < indexClosingSlashComment;
|
|
60586
60586
|
}
|
|
60587
60587
|
function fixedEncodeURIComponent(str2) {
|
|
60588
60588
|
return encodeURIComponent(str2).replace(/[!'()*]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
60589
60589
|
}
|
|
60590
|
-
function addSqlCommenterComment(span,
|
|
60591
|
-
if (typeof
|
|
60592
|
-
return
|
|
60590
|
+
function addSqlCommenterComment(span, query2) {
|
|
60591
|
+
if (typeof query2 !== "string" || query2.length === 0) {
|
|
60592
|
+
return query2;
|
|
60593
60593
|
}
|
|
60594
|
-
if (hasValidSqlComment(
|
|
60595
|
-
return
|
|
60594
|
+
if (hasValidSqlComment(query2)) {
|
|
60595
|
+
return query2;
|
|
60596
60596
|
}
|
|
60597
60597
|
const propagator = new core_1.W3CTraceContextPropagator;
|
|
60598
60598
|
const headers = {};
|
|
60599
60599
|
propagator.inject(api_1.trace.setSpan(api_1.ROOT_CONTEXT, span), headers, api_1.defaultTextMapSetter);
|
|
60600
60600
|
const sortedKeys = Object.keys(headers).sort();
|
|
60601
60601
|
if (sortedKeys.length === 0) {
|
|
60602
|
-
return
|
|
60602
|
+
return query2;
|
|
60603
60603
|
}
|
|
60604
60604
|
const commentString = sortedKeys.map((key) => {
|
|
60605
60605
|
const encodedValue = fixedEncodeURIComponent(headers[key]);
|
|
60606
60606
|
return `${key}='${encodedValue}'`;
|
|
60607
60607
|
}).join(",");
|
|
60608
|
-
return `${
|
|
60608
|
+
return `${query2} /*${commentString}*/`;
|
|
60609
60609
|
}
|
|
60610
60610
|
exports.addSqlCommenterComment = addSqlCommenterComment;
|
|
60611
60611
|
});
|
|
@@ -60658,8 +60658,8 @@ var require_utils25 = __commonJS((exports) => {
|
|
|
60658
60658
|
}
|
|
60659
60659
|
return jdbcString;
|
|
60660
60660
|
}
|
|
60661
|
-
function getQueryText(
|
|
60662
|
-
const [querySql, queryValues] = typeof
|
|
60661
|
+
function getQueryText(query2, format, values2, maskStatement = false, maskStatementHook = defaultMaskingHook) {
|
|
60662
|
+
const [querySql, queryValues] = typeof query2 === "string" ? [query2, values2] : [query2.sql, hasValues(query2) ? values2 || query2.values : values2];
|
|
60663
60663
|
try {
|
|
60664
60664
|
if (maskStatement) {
|
|
60665
60665
|
return maskStatementHook(querySql);
|
|
@@ -60673,14 +60673,14 @@ var require_utils25 = __commonJS((exports) => {
|
|
|
60673
60673
|
}
|
|
60674
60674
|
}
|
|
60675
60675
|
exports.getQueryText = getQueryText;
|
|
60676
|
-
function defaultMaskingHook(
|
|
60677
|
-
return
|
|
60676
|
+
function defaultMaskingHook(query2) {
|
|
60677
|
+
return query2.replace(/\b\d+\b/g, "?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g, "?");
|
|
60678
60678
|
}
|
|
60679
60679
|
function hasValues(obj) {
|
|
60680
60680
|
return "values" in obj;
|
|
60681
60681
|
}
|
|
60682
|
-
function getSpanName(
|
|
60683
|
-
const rawQuery = typeof
|
|
60682
|
+
function getSpanName(query2) {
|
|
60683
|
+
const rawQuery = typeof query2 === "object" ? query2.sql : query2;
|
|
60684
60684
|
const firstSpace = rawQuery?.indexOf(" ");
|
|
60685
60685
|
if (typeof firstSpace === "number" && firstSpace !== -1) {
|
|
60686
60686
|
return rawQuery?.substring(0, firstSpace);
|
|
@@ -60787,7 +60787,7 @@ var require_instrumentation24 = __commonJS((exports) => {
|
|
|
60787
60787
|
_patchQuery(format, isPrepared) {
|
|
60788
60788
|
return (originalQuery) => {
|
|
60789
60789
|
const thisPlugin = this;
|
|
60790
|
-
return function
|
|
60790
|
+
return function query2(query2, _valuesOrCallback, _callback) {
|
|
60791
60791
|
let values2;
|
|
60792
60792
|
if (Array.isArray(_valuesOrCallback)) {
|
|
60793
60793
|
values2 = _valuesOrCallback;
|
|
@@ -60796,7 +60796,7 @@ var require_instrumentation24 = __commonJS((exports) => {
|
|
|
60796
60796
|
}
|
|
60797
60797
|
const { maskStatement, maskStatementHook, responseHook } = thisPlugin.getConfig();
|
|
60798
60798
|
const attributes = (0, utils_1.getConnectionAttributes)(this.config, thisPlugin._dbSemconvStability, thisPlugin._netSemconvStability);
|
|
60799
|
-
const dbQueryText = (0, utils_1.getQueryText)(
|
|
60799
|
+
const dbQueryText = (0, utils_1.getQueryText)(query2, format, values2, maskStatement, maskStatementHook);
|
|
60800
60800
|
if (thisPlugin._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
60801
60801
|
attributes[semconv_1.ATTR_DB_SYSTEM] = semconv_1.DB_SYSTEM_VALUE_MYSQL;
|
|
60802
60802
|
attributes[semconv_1.ATTR_DB_STATEMENT] = dbQueryText;
|
|
@@ -60805,13 +60805,13 @@ var require_instrumentation24 = __commonJS((exports) => {
|
|
|
60805
60805
|
attributes[semantic_conventions_1.ATTR_DB_SYSTEM_NAME] = semantic_conventions_1.DB_SYSTEM_NAME_VALUE_MYSQL;
|
|
60806
60806
|
attributes[semantic_conventions_1.ATTR_DB_QUERY_TEXT] = dbQueryText;
|
|
60807
60807
|
}
|
|
60808
|
-
const span = thisPlugin.tracer.startSpan((0, utils_1.getSpanName)(
|
|
60808
|
+
const span = thisPlugin.tracer.startSpan((0, utils_1.getSpanName)(query2), {
|
|
60809
60809
|
kind: api2.SpanKind.CLIENT,
|
|
60810
60810
|
attributes
|
|
60811
60811
|
});
|
|
60812
60812
|
if (!isPrepared && thisPlugin.getConfig().addSqlCommenterCommentToQueries) {
|
|
60813
|
-
arguments[0] =
|
|
60814
|
-
sql: (0, sql_common_1.addSqlCommenterComment)(span,
|
|
60813
|
+
arguments[0] = query2 = typeof query2 === "string" ? (0, sql_common_1.addSqlCommenterComment)(span, query2) : Object.assign(query2, {
|
|
60814
|
+
sql: (0, sql_common_1.addSqlCommenterComment)(span, query2.sql)
|
|
60815
60815
|
});
|
|
60816
60816
|
}
|
|
60817
60817
|
const endSpan = (0, utils_1.once)((err, results) => {
|
|
@@ -60836,8 +60836,8 @@ var require_instrumentation24 = __commonJS((exports) => {
|
|
|
60836
60836
|
span.end();
|
|
60837
60837
|
});
|
|
60838
60838
|
if (arguments.length === 1) {
|
|
60839
|
-
if (typeof
|
|
60840
|
-
thisPlugin._wrap(
|
|
60839
|
+
if (typeof query2.onResult === "function") {
|
|
60840
|
+
thisPlugin._wrap(query2, "onResult", thisPlugin._patchCallbackQuery(endSpan));
|
|
60841
60841
|
}
|
|
60842
60842
|
const streamableQuery = originalQuery.apply(this, arguments);
|
|
60843
60843
|
streamableQuery.once("error", (err) => {
|
|
@@ -60923,24 +60923,24 @@ var require_utils26 = __commonJS((exports) => {
|
|
|
60923
60923
|
return jdbcString;
|
|
60924
60924
|
}
|
|
60925
60925
|
exports.getJDBCString = getJDBCString;
|
|
60926
|
-
function getDbQueryText(
|
|
60927
|
-
if (typeof
|
|
60928
|
-
return
|
|
60926
|
+
function getDbQueryText(query2) {
|
|
60927
|
+
if (typeof query2 === "string") {
|
|
60928
|
+
return query2;
|
|
60929
60929
|
} else {
|
|
60930
|
-
return
|
|
60930
|
+
return query2.sql;
|
|
60931
60931
|
}
|
|
60932
60932
|
}
|
|
60933
60933
|
exports.getDbQueryText = getDbQueryText;
|
|
60934
|
-
function getDbValues(
|
|
60935
|
-
if (typeof
|
|
60934
|
+
function getDbValues(query2, values2) {
|
|
60935
|
+
if (typeof query2 === "string") {
|
|
60936
60936
|
return arrayStringifyHelper(values2);
|
|
60937
60937
|
} else {
|
|
60938
|
-
return arrayStringifyHelper(values2 ||
|
|
60938
|
+
return arrayStringifyHelper(values2 || query2.values);
|
|
60939
60939
|
}
|
|
60940
60940
|
}
|
|
60941
60941
|
exports.getDbValues = getDbValues;
|
|
60942
|
-
function getSpanName(
|
|
60943
|
-
const rawQuery = typeof
|
|
60942
|
+
function getSpanName(query2) {
|
|
60943
|
+
const rawQuery = typeof query2 === "object" ? query2.sql : query2;
|
|
60944
60944
|
const firstSpace = rawQuery?.indexOf(" ");
|
|
60945
60945
|
if (typeof firstSpace === "number" && firstSpace !== -1) {
|
|
60946
60946
|
return rawQuery?.substring(0, firstSpace);
|
|
@@ -61047,7 +61047,7 @@ var require_instrumentation25 = __commonJS((exports) => {
|
|
|
61047
61047
|
_patchCreatePool() {
|
|
61048
61048
|
return (originalCreatePool) => {
|
|
61049
61049
|
const thisPlugin = this;
|
|
61050
|
-
return function createPool(
|
|
61050
|
+
return function createPool(_config2) {
|
|
61051
61051
|
const pool = originalCreatePool(...arguments);
|
|
61052
61052
|
thisPlugin._wrap(pool, "query", thisPlugin._patchQuery(pool));
|
|
61053
61053
|
thisPlugin._wrap(pool, "getConnection", thisPlugin._patchGetConnection(pool));
|
|
@@ -61074,7 +61074,7 @@ var require_instrumentation25 = __commonJS((exports) => {
|
|
|
61074
61074
|
_patchCreatePoolCluster() {
|
|
61075
61075
|
return (originalCreatePoolCluster) => {
|
|
61076
61076
|
const thisPlugin = this;
|
|
61077
|
-
return function createPool(
|
|
61077
|
+
return function createPool(_config2) {
|
|
61078
61078
|
const cluster = originalCreatePoolCluster(...arguments);
|
|
61079
61079
|
thisPlugin._wrap(cluster, "getConnection", thisPlugin._patchGetConnection(cluster));
|
|
61080
61080
|
thisPlugin._wrap(cluster, "add", thisPlugin._patchAdd(cluster));
|
|
@@ -61141,7 +61141,7 @@ var require_instrumentation25 = __commonJS((exports) => {
|
|
|
61141
61141
|
_patchQuery(connection) {
|
|
61142
61142
|
return (originalQuery) => {
|
|
61143
61143
|
const thisPlugin = this;
|
|
61144
|
-
return function
|
|
61144
|
+
return function query2(query2, _valuesOrCallback, _callback) {
|
|
61145
61145
|
if (!thisPlugin["_enabled"]) {
|
|
61146
61146
|
thisPlugin._unwrap(connection, "query");
|
|
61147
61147
|
return originalQuery.apply(connection, arguments);
|
|
@@ -61149,7 +61149,7 @@ var require_instrumentation25 = __commonJS((exports) => {
|
|
|
61149
61149
|
const attributes = {};
|
|
61150
61150
|
const { host, port, database, user } = (0, utils_1.getConfig)(connection.config);
|
|
61151
61151
|
const portNumber = parseInt(port, 10);
|
|
61152
|
-
const dbQueryText = (0, utils_1.getDbQueryText)(
|
|
61152
|
+
const dbQueryText = (0, utils_1.getDbQueryText)(query2);
|
|
61153
61153
|
if (thisPlugin._dbSemconvStability & instrumentation_1.SemconvStability.OLD) {
|
|
61154
61154
|
attributes[semconv_1.ATTR_DB_SYSTEM] = semconv_1.DB_SYSTEM_VALUE_MYSQL;
|
|
61155
61155
|
attributes[semconv_1.ATTR_DB_CONNECTION_STRING] = (0, utils_1.getJDBCString)(host, port, database);
|
|
@@ -61174,7 +61174,7 @@ var require_instrumentation25 = __commonJS((exports) => {
|
|
|
61174
61174
|
attributes[semantic_conventions_1.ATTR_SERVER_PORT] = portNumber;
|
|
61175
61175
|
}
|
|
61176
61176
|
}
|
|
61177
|
-
const span = thisPlugin.tracer.startSpan((0, utils_1.getSpanName)(
|
|
61177
|
+
const span = thisPlugin.tracer.startSpan((0, utils_1.getSpanName)(query2), {
|
|
61178
61178
|
kind: api_1.SpanKind.CLIENT,
|
|
61179
61179
|
attributes
|
|
61180
61180
|
});
|
|
@@ -61185,7 +61185,7 @@ var require_instrumentation25 = __commonJS((exports) => {
|
|
|
61185
61185
|
} else if (arguments[2]) {
|
|
61186
61186
|
values2 = [_valuesOrCallback];
|
|
61187
61187
|
}
|
|
61188
|
-
span.setAttribute(AttributeNames_1.AttributeNames.MYSQL_VALUES, (0, utils_1.getDbValues)(
|
|
61188
|
+
span.setAttribute(AttributeNames_1.AttributeNames.MYSQL_VALUES, (0, utils_1.getDbValues)(query2, values2));
|
|
61189
61189
|
}
|
|
61190
61190
|
const cbIndex = Array.from(arguments).findIndex((arg) => typeof arg === "function");
|
|
61191
61191
|
const parentContext = api_1.context.active();
|
|
@@ -67615,7 +67615,7 @@ var require_EnvDetector = __commonJS((exports) => {
|
|
|
67615
67615
|
_MAX_LENGTH = 255;
|
|
67616
67616
|
_COMMA_SEPARATOR = ",";
|
|
67617
67617
|
_LABEL_KEY_VALUE_SPLITTER = "=";
|
|
67618
|
-
detect(
|
|
67618
|
+
detect(_config2) {
|
|
67619
67619
|
const attributes = {};
|
|
67620
67620
|
const rawAttributes = (0, core_1.getStringFromEnv)("OTEL_RESOURCE_ATTRIBUTES");
|
|
67621
67621
|
const serviceName = (0, core_1.getStringFromEnv)("OTEL_SERVICE_NAME");
|
|
@@ -67902,7 +67902,7 @@ var require_HostDetector = __commonJS((exports) => {
|
|
|
67902
67902
|
var utils_1 = require_utils38();
|
|
67903
67903
|
|
|
67904
67904
|
class HostDetector {
|
|
67905
|
-
detect(
|
|
67905
|
+
detect(_config2) {
|
|
67906
67906
|
const attributes = {
|
|
67907
67907
|
[semconv_1.ATTR_HOST_NAME]: (0, os_1.hostname)(),
|
|
67908
67908
|
[semconv_1.ATTR_HOST_ARCH]: (0, utils_1.normalizeArch)((0, os_1.arch)()),
|
|
@@ -67923,7 +67923,7 @@ var require_OSDetector = __commonJS((exports) => {
|
|
|
67923
67923
|
var utils_1 = require_utils38();
|
|
67924
67924
|
|
|
67925
67925
|
class OSDetector {
|
|
67926
|
-
detect(
|
|
67926
|
+
detect(_config2) {
|
|
67927
67927
|
const attributes = {
|
|
67928
67928
|
[semconv_1.ATTR_OS_TYPE]: (0, utils_1.normalizeType)((0, os_1.platform)()),
|
|
67929
67929
|
[semconv_1.ATTR_OS_VERSION]: (0, os_1.release)()
|
|
@@ -67943,7 +67943,7 @@ var require_ProcessDetector = __commonJS((exports) => {
|
|
|
67943
67943
|
var os = __require("os");
|
|
67944
67944
|
|
|
67945
67945
|
class ProcessDetector {
|
|
67946
|
-
detect(
|
|
67946
|
+
detect(_config2) {
|
|
67947
67947
|
const attributes = {
|
|
67948
67948
|
[semconv_1.ATTR_PROCESS_PID]: process.pid,
|
|
67949
67949
|
[semconv_1.ATTR_PROCESS_EXECUTABLE_NAME]: process.title,
|
|
@@ -67980,7 +67980,7 @@ var require_ServiceInstanceIdDetector = __commonJS((exports) => {
|
|
|
67980
67980
|
var crypto_1 = __require("crypto");
|
|
67981
67981
|
|
|
67982
67982
|
class ServiceInstanceIdDetector {
|
|
67983
|
-
detect(
|
|
67983
|
+
detect(_config2) {
|
|
67984
67984
|
return {
|
|
67985
67985
|
attributes: {
|
|
67986
67986
|
[semconv_1.ATTR_SERVICE_INSTANCE_ID]: (0, crypto_1.randomUUID)()
|
|
@@ -144588,7 +144588,7 @@ config(en_default());
|
|
|
144588
144588
|
// package.json
|
|
144589
144589
|
var package_default = {
|
|
144590
144590
|
name: "mcp-ts-template",
|
|
144591
|
-
version: "3.0.
|
|
144591
|
+
version: "3.0.7",
|
|
144592
144592
|
mcpName: "io.github.cyanheads/mcp-ts-template",
|
|
144593
144593
|
description: "TypeScript template for MCP servers with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and Cloudflare Workers support.",
|
|
144594
144594
|
main: "dist/index.js",
|
|
@@ -144667,7 +144667,7 @@ var package_default = {
|
|
|
144667
144667
|
},
|
|
144668
144668
|
devDependencies: {
|
|
144669
144669
|
"@cloudflare/workers-types": "^4.20260305.1",
|
|
144670
|
-
"@biomejs/biome": "2.4.
|
|
144670
|
+
"@biomejs/biome": "2.4.6",
|
|
144671
144671
|
"@hono/mcp": "^0.2.4",
|
|
144672
144672
|
"@traversable/registry": "^0.0.49",
|
|
144673
144673
|
"@traversable/zod-test": "^0.0.28",
|
|
@@ -144675,7 +144675,7 @@ var package_default = {
|
|
|
144675
144675
|
"@types/bun": "^1.3.10",
|
|
144676
144676
|
"@types/diff": "^8.0.0",
|
|
144677
144677
|
"@types/js-yaml": "^4.0.9",
|
|
144678
|
-
"@types/node": "^25.3.
|
|
144678
|
+
"@types/node": "^25.3.5",
|
|
144679
144679
|
"@types/node-cron": "^3.0.11",
|
|
144680
144680
|
"@types/papaparse": "^5.5.2",
|
|
144681
144681
|
"@types/sanitize-html": "^2.16.0",
|
|
@@ -144763,10 +144763,10 @@ var package_default = {
|
|
|
144763
144763
|
dotenv: "^17.3.1",
|
|
144764
144764
|
"fast-xml-parser": "^5.4.2",
|
|
144765
144765
|
hono: "^4.12.5",
|
|
144766
|
-
jose: "^6.
|
|
144766
|
+
jose: "^6.2.0",
|
|
144767
144767
|
"js-yaml": "^4.1.1",
|
|
144768
144768
|
"node-cron": "^4.2.1",
|
|
144769
|
-
openai: "^6.
|
|
144769
|
+
openai: "^6.27.0",
|
|
144770
144770
|
papaparse: "^5.5.3",
|
|
144771
144771
|
"partial-json": "^0.1.7",
|
|
144772
144772
|
"pdf-lib": "^1.17.1",
|
|
@@ -145174,7 +145174,35 @@ var parseConfig = () => {
|
|
|
145174
145174
|
}
|
|
145175
145175
|
return parsedConfig.data;
|
|
145176
145176
|
};
|
|
145177
|
-
var
|
|
145177
|
+
var _config;
|
|
145178
|
+
var config2 = new Proxy({}, {
|
|
145179
|
+
get(_target, prop) {
|
|
145180
|
+
_config ??= parseConfig();
|
|
145181
|
+
return _config[prop];
|
|
145182
|
+
},
|
|
145183
|
+
set(_target, prop, value) {
|
|
145184
|
+
_config ??= parseConfig();
|
|
145185
|
+
_config[prop] = value;
|
|
145186
|
+
return true;
|
|
145187
|
+
},
|
|
145188
|
+
defineProperty(_target, prop, descriptor) {
|
|
145189
|
+
_config ??= parseConfig();
|
|
145190
|
+
Object.defineProperty(_config, prop, descriptor);
|
|
145191
|
+
return true;
|
|
145192
|
+
},
|
|
145193
|
+
has(_target, prop) {
|
|
145194
|
+
_config ??= parseConfig();
|
|
145195
|
+
return prop in _config;
|
|
145196
|
+
},
|
|
145197
|
+
ownKeys() {
|
|
145198
|
+
_config ??= parseConfig();
|
|
145199
|
+
return Reflect.ownKeys(_config);
|
|
145200
|
+
},
|
|
145201
|
+
getOwnPropertyDescriptor(_target, prop) {
|
|
145202
|
+
_config ??= parseConfig();
|
|
145203
|
+
return Object.getOwnPropertyDescriptor(_config, prop);
|
|
145204
|
+
}
|
|
145205
|
+
});
|
|
145178
145206
|
|
|
145179
145207
|
// src/container/core/container.ts
|
|
145180
145208
|
function token(description) {
|
|
@@ -145511,7 +145539,7 @@ var safeJSON = (text) => {
|
|
|
145511
145539
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
145512
145540
|
|
|
145513
145541
|
// node_modules/openai/version.mjs
|
|
145514
|
-
var VERSION = "6.
|
|
145542
|
+
var VERSION = "6.27.0";
|
|
145515
145543
|
|
|
145516
145544
|
// node_modules/openai/internal/detect-platform.mjs
|
|
145517
145545
|
var isRunningInBrowser = () => {
|
|
@@ -146031,6 +146059,12 @@ function stringify(object2, opts = {}) {
|
|
|
146031
146059
|
}
|
|
146032
146060
|
return joined.length > 0 ? prefix + joined : "";
|
|
146033
146061
|
}
|
|
146062
|
+
|
|
146063
|
+
// node_modules/openai/internal/utils/query.mjs
|
|
146064
|
+
function stringifyQuery(query) {
|
|
146065
|
+
return stringify(query, { arrayFormat: "brackets" });
|
|
146066
|
+
}
|
|
146067
|
+
|
|
146034
146068
|
// node_modules/openai/internal/utils/bytes.mjs
|
|
146035
146069
|
function concatBytes(buffers) {
|
|
146036
146070
|
let length = 0;
|
|
@@ -149088,9 +149122,9 @@ class Runs extends APIResource {
|
|
|
149088
149122
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
149089
149123
|
});
|
|
149090
149124
|
}
|
|
149091
|
-
list(threadID,
|
|
149125
|
+
list(threadID, query2 = {}, options) {
|
|
149092
149126
|
return this._client.getAPIList(path`/threads/${threadID}/runs`, CursorPage, {
|
|
149093
|
-
query,
|
|
149127
|
+
query: query2,
|
|
149094
149128
|
...options,
|
|
149095
149129
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
149096
149130
|
});
|
|
@@ -149271,9 +149305,9 @@ class Files extends APIResource {
|
|
|
149271
149305
|
const { container_id } = params;
|
|
149272
149306
|
return this._client.get(path`/containers/${container_id}/files/${fileID}`, options);
|
|
149273
149307
|
}
|
|
149274
|
-
list(containerID,
|
|
149308
|
+
list(containerID, query2 = {}, options) {
|
|
149275
149309
|
return this._client.getAPIList(path`/containers/${containerID}/files`, CursorPage, {
|
|
149276
|
-
query,
|
|
149310
|
+
query: query2,
|
|
149277
149311
|
...options
|
|
149278
149312
|
});
|
|
149279
149313
|
}
|
|
@@ -149299,8 +149333,8 @@ class Containers extends APIResource {
|
|
|
149299
149333
|
retrieve(containerID, options) {
|
|
149300
149334
|
return this._client.get(path`/containers/${containerID}`, options);
|
|
149301
149335
|
}
|
|
149302
|
-
list(
|
|
149303
|
-
return this._client.getAPIList("/containers", CursorPage, { query, ...options });
|
|
149336
|
+
list(query2 = {}, options) {
|
|
149337
|
+
return this._client.getAPIList("/containers", CursorPage, { query: query2, ...options });
|
|
149304
149338
|
}
|
|
149305
149339
|
delete(containerID, options) {
|
|
149306
149340
|
return this._client.delete(path`/containers/${containerID}`, {
|
|
@@ -149321,11 +149355,11 @@ class Items extends APIResource {
|
|
|
149321
149355
|
});
|
|
149322
149356
|
}
|
|
149323
149357
|
retrieve(itemID, params, options) {
|
|
149324
|
-
const { conversation_id, ...
|
|
149325
|
-
return this._client.get(path`/conversations/${conversation_id}/items/${itemID}`, { query, ...options });
|
|
149358
|
+
const { conversation_id, ...query2 } = params;
|
|
149359
|
+
return this._client.get(path`/conversations/${conversation_id}/items/${itemID}`, { query: query2, ...options });
|
|
149326
149360
|
}
|
|
149327
|
-
list(conversationID,
|
|
149328
|
-
return this._client.getAPIList(path`/conversations/${conversationID}/items`, ConversationCursorPage, { query, ...options });
|
|
149361
|
+
list(conversationID, query2 = {}, options) {
|
|
149362
|
+
return this._client.getAPIList(path`/conversations/${conversationID}/items`, ConversationCursorPage, { query: query2, ...options });
|
|
149329
149363
|
}
|
|
149330
149364
|
delete(itemID, params, options) {
|
|
149331
149365
|
const { conversation_id } = params;
|
|
@@ -149390,8 +149424,8 @@ class OutputItems extends APIResource {
|
|
|
149390
149424
|
return this._client.get(path`/evals/${eval_id}/runs/${run_id}/output_items/${outputItemID}`, options);
|
|
149391
149425
|
}
|
|
149392
149426
|
list(runID, params, options) {
|
|
149393
|
-
const { eval_id, ...
|
|
149394
|
-
return this._client.getAPIList(path`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query, ...options });
|
|
149427
|
+
const { eval_id, ...query2 } = params;
|
|
149428
|
+
return this._client.getAPIList(path`/evals/${eval_id}/runs/${runID}/output_items`, CursorPage, { query: query2, ...options });
|
|
149395
149429
|
}
|
|
149396
149430
|
}
|
|
149397
149431
|
|
|
@@ -149408,9 +149442,9 @@ class Runs2 extends APIResource {
|
|
|
149408
149442
|
const { eval_id } = params;
|
|
149409
149443
|
return this._client.get(path`/evals/${eval_id}/runs/${runID}`, options);
|
|
149410
149444
|
}
|
|
149411
|
-
list(evalID,
|
|
149445
|
+
list(evalID, query2 = {}, options) {
|
|
149412
149446
|
return this._client.getAPIList(path`/evals/${evalID}/runs`, CursorPage, {
|
|
149413
|
-
query,
|
|
149447
|
+
query: query2,
|
|
149414
149448
|
...options
|
|
149415
149449
|
});
|
|
149416
149450
|
}
|
|
@@ -149440,8 +149474,8 @@ class Evals extends APIResource {
|
|
|
149440
149474
|
update(evalID, body, options) {
|
|
149441
149475
|
return this._client.post(path`/evals/${evalID}`, { body, ...options });
|
|
149442
149476
|
}
|
|
149443
|
-
list(
|
|
149444
|
-
return this._client.getAPIList("/evals", CursorPage, { query, ...options });
|
|
149477
|
+
list(query2 = {}, options) {
|
|
149478
|
+
return this._client.getAPIList("/evals", CursorPage, { query: query2, ...options });
|
|
149445
149479
|
}
|
|
149446
149480
|
delete(evalID, options) {
|
|
149447
149481
|
return this._client.delete(path`/evals/${evalID}`, options);
|
|
@@ -149456,8 +149490,8 @@ class Files2 extends APIResource {
|
|
|
149456
149490
|
retrieve(fileID, options) {
|
|
149457
149491
|
return this._client.get(path`/files/${fileID}`, options);
|
|
149458
149492
|
}
|
|
149459
|
-
list(
|
|
149460
|
-
return this._client.getAPIList("/files", CursorPage, { query, ...options });
|
|
149493
|
+
list(query2 = {}, options) {
|
|
149494
|
+
return this._client.getAPIList("/files", CursorPage, { query: query2, ...options });
|
|
149461
149495
|
}
|
|
149462
149496
|
delete(fileID, options) {
|
|
149463
149497
|
return this._client.delete(path`/files/${fileID}`, options);
|
|
@@ -149513,12 +149547,15 @@ class Permissions extends APIResource {
|
|
|
149513
149547
|
create(fineTunedModelCheckpoint, body, options) {
|
|
149514
149548
|
return this._client.getAPIList(path`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, Page, { body, method: "post", ...options });
|
|
149515
149549
|
}
|
|
149516
|
-
retrieve(fineTunedModelCheckpoint,
|
|
149550
|
+
retrieve(fineTunedModelCheckpoint, query2 = {}, options) {
|
|
149517
149551
|
return this._client.get(path`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, {
|
|
149518
|
-
query,
|
|
149552
|
+
query: query2,
|
|
149519
149553
|
...options
|
|
149520
149554
|
});
|
|
149521
149555
|
}
|
|
149556
|
+
list(fineTunedModelCheckpoint, query2 = {}, options) {
|
|
149557
|
+
return this._client.getAPIList(path`/fine_tuning/checkpoints/${fineTunedModelCheckpoint}/permissions`, ConversationCursorPage, { query: query2, ...options });
|
|
149558
|
+
}
|
|
149522
149559
|
delete(permissionID, params, options) {
|
|
149523
149560
|
const { fine_tuned_model_checkpoint } = params;
|
|
149524
149561
|
return this._client.delete(path`/fine_tuning/checkpoints/${fine_tuned_model_checkpoint}/permissions/${permissionID}`, options);
|
|
@@ -149536,8 +149573,8 @@ Checkpoints.Permissions = Permissions;
|
|
|
149536
149573
|
|
|
149537
149574
|
// node_modules/openai/resources/fine-tuning/jobs/checkpoints.mjs
|
|
149538
149575
|
class Checkpoints2 extends APIResource {
|
|
149539
|
-
list(fineTuningJobID,
|
|
149540
|
-
return this._client.getAPIList(path`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query, ...options });
|
|
149576
|
+
list(fineTuningJobID, query2 = {}, options) {
|
|
149577
|
+
return this._client.getAPIList(path`/fine_tuning/jobs/${fineTuningJobID}/checkpoints`, CursorPage, { query: query2, ...options });
|
|
149541
149578
|
}
|
|
149542
149579
|
}
|
|
149543
149580
|
|
|
@@ -149553,14 +149590,14 @@ class Jobs extends APIResource {
|
|
|
149553
149590
|
retrieve(fineTuningJobID, options) {
|
|
149554
149591
|
return this._client.get(path`/fine_tuning/jobs/${fineTuningJobID}`, options);
|
|
149555
149592
|
}
|
|
149556
|
-
list(
|
|
149557
|
-
return this._client.getAPIList("/fine_tuning/jobs", CursorPage, { query, ...options });
|
|
149593
|
+
list(query2 = {}, options) {
|
|
149594
|
+
return this._client.getAPIList("/fine_tuning/jobs", CursorPage, { query: query2, ...options });
|
|
149558
149595
|
}
|
|
149559
149596
|
cancel(fineTuningJobID, options) {
|
|
149560
149597
|
return this._client.post(path`/fine_tuning/jobs/${fineTuningJobID}/cancel`, options);
|
|
149561
149598
|
}
|
|
149562
|
-
listEvents(fineTuningJobID,
|
|
149563
|
-
return this._client.getAPIList(path`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query, ...options });
|
|
149599
|
+
listEvents(fineTuningJobID, query2 = {}, options) {
|
|
149600
|
+
return this._client.getAPIList(path`/fine_tuning/jobs/${fineTuningJobID}/events`, CursorPage, { query: query2, ...options });
|
|
149564
149601
|
}
|
|
149565
149602
|
pause(fineTuningJobID, options) {
|
|
149566
149603
|
return this._client.post(path`/fine_tuning/jobs/${fineTuningJobID}/pause`, options);
|
|
@@ -150057,8 +150094,8 @@ function finalizeResponse(snapshot, params) {
|
|
|
150057
150094
|
|
|
150058
150095
|
// node_modules/openai/resources/responses/input-items.mjs
|
|
150059
150096
|
class InputItems extends APIResource {
|
|
150060
|
-
list(responseID,
|
|
150061
|
-
return this._client.getAPIList(path`/responses/${responseID}/input_items`, CursorPage, { query, ...options });
|
|
150097
|
+
list(responseID, query2 = {}, options) {
|
|
150098
|
+
return this._client.getAPIList(path`/responses/${responseID}/input_items`, CursorPage, { query: query2, ...options });
|
|
150062
150099
|
}
|
|
150063
150100
|
}
|
|
150064
150101
|
|
|
@@ -150084,11 +150121,11 @@ class Responses extends APIResource {
|
|
|
150084
150121
|
return rsp;
|
|
150085
150122
|
});
|
|
150086
150123
|
}
|
|
150087
|
-
retrieve(responseID,
|
|
150124
|
+
retrieve(responseID, query2 = {}, options) {
|
|
150088
150125
|
return this._client.get(path`/responses/${responseID}`, {
|
|
150089
|
-
query,
|
|
150126
|
+
query: query2,
|
|
150090
150127
|
...options,
|
|
150091
|
-
stream:
|
|
150128
|
+
stream: query2?.stream ?? false
|
|
150092
150129
|
})._thenUnwrap((rsp) => {
|
|
150093
150130
|
if ("object" in rsp && rsp.object === "response") {
|
|
150094
150131
|
addOutputText(rsp);
|
|
@@ -150153,9 +150190,9 @@ class Versions extends APIResource {
|
|
|
150153
150190
|
const { skill_id } = params;
|
|
150154
150191
|
return this._client.get(path`/skills/${skill_id}/versions/${version4}`, options);
|
|
150155
150192
|
}
|
|
150156
|
-
list(skillID,
|
|
150193
|
+
list(skillID, query2 = {}, options) {
|
|
150157
150194
|
return this._client.getAPIList(path`/skills/${skillID}/versions`, CursorPage, {
|
|
150158
|
-
query,
|
|
150195
|
+
query: query2,
|
|
150159
150196
|
...options
|
|
150160
150197
|
});
|
|
150161
150198
|
}
|
|
@@ -150182,8 +150219,8 @@ class Skills extends APIResource {
|
|
|
150182
150219
|
update(skillID, body, options) {
|
|
150183
150220
|
return this._client.post(path`/skills/${skillID}`, { body, ...options });
|
|
150184
150221
|
}
|
|
150185
|
-
list(
|
|
150186
|
-
return this._client.getAPIList("/skills", CursorPage, { query, ...options });
|
|
150222
|
+
list(query2 = {}, options) {
|
|
150223
|
+
return this._client.getAPIList("/skills", CursorPage, { query: query2, ...options });
|
|
150187
150224
|
}
|
|
150188
150225
|
delete(skillID, options) {
|
|
150189
150226
|
return this._client.delete(path`/skills/${skillID}`, options);
|
|
@@ -150262,8 +150299,8 @@ class FileBatches extends APIResource {
|
|
|
150262
150299
|
return await this.poll(vectorStoreId, batch.id, options);
|
|
150263
150300
|
}
|
|
150264
150301
|
listFiles(batchID, params, options) {
|
|
150265
|
-
const { vector_store_id, ...
|
|
150266
|
-
return this._client.getAPIList(path`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query, ...options, headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
|
|
150302
|
+
const { vector_store_id, ...query2 } = params;
|
|
150303
|
+
return this._client.getAPIList(path`/vector_stores/${vector_store_id}/file_batches/${batchID}/files`, CursorPage, { query: query2, ...options, headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers]) });
|
|
150267
150304
|
}
|
|
150268
150305
|
async poll(vectorStoreID, batchID, options) {
|
|
150269
150306
|
const headers = buildHeaders([
|
|
@@ -150348,9 +150385,9 @@ class Files3 extends APIResource {
|
|
|
150348
150385
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
150349
150386
|
});
|
|
150350
150387
|
}
|
|
150351
|
-
list(vectorStoreID,
|
|
150388
|
+
list(vectorStoreID, query2 = {}, options) {
|
|
150352
150389
|
return this._client.getAPIList(path`/vector_stores/${vectorStoreID}/files`, CursorPage, {
|
|
150353
|
-
query,
|
|
150390
|
+
query: query2,
|
|
150354
150391
|
...options,
|
|
150355
150392
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
150356
150393
|
});
|
|
@@ -150442,9 +150479,9 @@ class VectorStores extends APIResource {
|
|
|
150442
150479
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
150443
150480
|
});
|
|
150444
150481
|
}
|
|
150445
|
-
list(
|
|
150482
|
+
list(query2 = {}, options) {
|
|
150446
150483
|
return this._client.getAPIList("/vector_stores", CursorPage, {
|
|
150447
|
-
query,
|
|
150484
|
+
query: query2,
|
|
150448
150485
|
...options,
|
|
150449
150486
|
headers: buildHeaders([{ "OpenAI-Beta": "assistants=v2" }, options?.headers])
|
|
150450
150487
|
});
|
|
@@ -150474,15 +150511,15 @@ class Videos extends APIResource {
|
|
|
150474
150511
|
retrieve(videoID, options) {
|
|
150475
150512
|
return this._client.get(path`/videos/${videoID}`, options);
|
|
150476
150513
|
}
|
|
150477
|
-
list(
|
|
150478
|
-
return this._client.getAPIList("/videos", ConversationCursorPage, { query, ...options });
|
|
150514
|
+
list(query2 = {}, options) {
|
|
150515
|
+
return this._client.getAPIList("/videos", ConversationCursorPage, { query: query2, ...options });
|
|
150479
150516
|
}
|
|
150480
150517
|
delete(videoID, options) {
|
|
150481
150518
|
return this._client.delete(path`/videos/${videoID}`, options);
|
|
150482
150519
|
}
|
|
150483
|
-
downloadContent(videoID,
|
|
150520
|
+
downloadContent(videoID, query2 = {}, options) {
|
|
150484
150521
|
return this._client.get(path`/videos/${videoID}/content`, {
|
|
150485
|
-
query,
|
|
150522
|
+
query: query2,
|
|
150486
150523
|
...options,
|
|
150487
150524
|
headers: buildHeaders([{ Accept: "application/binary" }, options?.headers]),
|
|
150488
150525
|
__binaryResponse: true
|
|
@@ -150656,8 +150693,8 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
150656
150693
|
async authHeaders(opts) {
|
|
150657
150694
|
return buildHeaders([{ Authorization: `Bearer ${this.apiKey}` }]);
|
|
150658
150695
|
}
|
|
150659
|
-
stringifyQuery(
|
|
150660
|
-
return
|
|
150696
|
+
stringifyQuery(query2) {
|
|
150697
|
+
return stringifyQuery(query2);
|
|
150661
150698
|
}
|
|
150662
150699
|
getUserAgent() {
|
|
150663
150700
|
return `${this.constructor.name}/JS ${VERSION}`;
|
|
@@ -150686,15 +150723,15 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
150686
150723
|
this.apiKey = token2;
|
|
150687
150724
|
return true;
|
|
150688
150725
|
}
|
|
150689
|
-
buildURL(path2,
|
|
150726
|
+
buildURL(path2, query2, defaultBaseURL) {
|
|
150690
150727
|
const baseURL = !__classPrivateFieldGet(this, _OpenAI_instances, "m", _OpenAI_baseURLOverridden).call(this) && defaultBaseURL || this.baseURL;
|
|
150691
150728
|
const url2 = isAbsoluteURL(path2) ? new URL(path2) : new URL(baseURL + (baseURL.endsWith("/") && path2.startsWith("/") ? path2.slice(1) : path2));
|
|
150692
150729
|
const defaultQuery = this.defaultQuery();
|
|
150693
150730
|
if (!isEmptyObj(defaultQuery)) {
|
|
150694
|
-
|
|
150731
|
+
query2 = { ...defaultQuery, ...query2 };
|
|
150695
150732
|
}
|
|
150696
|
-
if (typeof
|
|
150697
|
-
url2.search = this.stringifyQuery(
|
|
150733
|
+
if (typeof query2 === "object" && query2 && !Array.isArray(query2)) {
|
|
150734
|
+
url2.search = this.stringifyQuery(query2);
|
|
150698
150735
|
}
|
|
150699
150736
|
return url2.toString();
|
|
150700
150737
|
}
|
|
@@ -150886,7 +150923,7 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
150886
150923
|
timeoutMillis = Date.parse(retryAfterHeader) - Date.now();
|
|
150887
150924
|
}
|
|
150888
150925
|
}
|
|
150889
|
-
if (
|
|
150926
|
+
if (timeoutMillis === undefined) {
|
|
150890
150927
|
const maxRetries = options.maxRetries ?? this.maxRetries;
|
|
150891
150928
|
timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries);
|
|
150892
150929
|
}
|
|
@@ -150903,8 +150940,8 @@ https://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety
|
|
|
150903
150940
|
}
|
|
150904
150941
|
async buildRequest(inputOptions, { retryCount = 0 } = {}) {
|
|
150905
150942
|
const options = { ...inputOptions };
|
|
150906
|
-
const { method, path: path2, query, defaultBaseURL } = options;
|
|
150907
|
-
const url2 = this.buildURL(path2,
|
|
150943
|
+
const { method, path: path2, query: query2, defaultBaseURL } = options;
|
|
150944
|
+
const url2 = this.buildURL(path2, query2, defaultBaseURL);
|
|
150908
150945
|
if ("timeout" in options)
|
|
150909
150946
|
validatePositiveInteger("timeout", options.timeout);
|
|
150910
150947
|
options.timeout = options.timeout ?? this.timeout;
|
|
@@ -154418,12 +154455,12 @@ class SupabaseProvider {
|
|
|
154418
154455
|
return await ErrorHandler.tryCatch(async () => {
|
|
154419
154456
|
const now = new Date().toISOString();
|
|
154420
154457
|
const limit2 = options?.limit ?? DEFAULT_LIST_LIMIT6;
|
|
154421
|
-
let
|
|
154458
|
+
let query2 = this.getClient().from(TABLE_NAME).select("key").eq("tenant_id", tenantId).like("key", `${escapeLikePattern2(prefix)}%`).or(`expires_at.is.null,expires_at.gt.${now}`).order("key", { ascending: true }).limit(limit2 + 1);
|
|
154422
154459
|
if (options?.cursor) {
|
|
154423
154460
|
const lastKey = decodeCursor(options.cursor, tenantId, context);
|
|
154424
|
-
|
|
154461
|
+
query2 = query2.gt("key", lastKey);
|
|
154425
154462
|
}
|
|
154426
|
-
const { data, error: error49 } = await
|
|
154463
|
+
const { data, error: error49 } = await query2;
|
|
154427
154464
|
if (error49)
|
|
154428
154465
|
throw error49;
|
|
154429
154466
|
const keys = data?.map((item) => item.key) ?? [];
|
|
@@ -173062,12 +173099,7 @@ function createMcpToolHandler({
|
|
|
173062
173099
|
});
|
|
173063
173100
|
return {
|
|
173064
173101
|
isError: true,
|
|
173065
|
-
content: [{ type: "text", text: `Error: ${mcpError.message}` }]
|
|
173066
|
-
structuredContent: {
|
|
173067
|
-
code: mcpError.code,
|
|
173068
|
-
message: mcpError.message,
|
|
173069
|
-
data: mcpError.data
|
|
173070
|
-
}
|
|
173102
|
+
content: [{ type: "text", text: `Error: ${mcpError.message}` }]
|
|
173071
173103
|
};
|
|
173072
173104
|
}
|
|
173073
173105
|
};
|
|
@@ -177827,7 +177859,7 @@ function isCloudflareWorkers() {
|
|
|
177827
177859
|
var USER_AGENT;
|
|
177828
177860
|
if (typeof navigator === "undefined" || !navigator.userAgent?.startsWith?.("Mozilla/5.0 ")) {
|
|
177829
177861
|
const NAME = "jose";
|
|
177830
|
-
const VERSION2 = "v6.
|
|
177862
|
+
const VERSION2 = "v6.2.0";
|
|
177831
177863
|
USER_AGENT = `${NAME}/${VERSION2}`;
|
|
177832
177864
|
}
|
|
177833
177865
|
var customFetch = Symbol();
|
|
@@ -178567,7 +178599,7 @@ function createHttpApp(serverFactory, parentContext) {
|
|
|
178567
178599
|
allowMethods: ["GET", "POST", "DELETE", "OPTIONS"],
|
|
178568
178600
|
allowHeaders: ["Content-Type", "Authorization", "Mcp-Session-Id", "MCP-Protocol-Version"],
|
|
178569
178601
|
exposeHeaders: ["Mcp-Session-Id"],
|
|
178570
|
-
credentials: true
|
|
178602
|
+
...allowedOrigin !== "*" && { credentials: true }
|
|
178571
178603
|
}));
|
|
178572
178604
|
app.onError(httpErrorHandler);
|
|
178573
178605
|
app.use(config2.mcpHttpEndpointPath, async (c, next) => {
|
|
@@ -178668,7 +178700,6 @@ function createHttpApp(serverFactory, parentContext) {
|
|
|
178668
178700
|
}, 400);
|
|
178669
178701
|
}
|
|
178670
178702
|
const providedSessionId = c.req.header("mcp-session-id");
|
|
178671
|
-
const sessionId = providedSessionId ?? generateSecureSessionId();
|
|
178672
178703
|
const authInfo = authContext.getStore()?.authInfo;
|
|
178673
178704
|
const sessionIdentity = authInfo ? Object.fromEntries(Object.entries({
|
|
178674
178705
|
tenantId: authInfo.tenantId,
|
|
@@ -178684,22 +178715,23 @@ function createHttpApp(serverFactory, parentContext) {
|
|
|
178684
178715
|
});
|
|
178685
178716
|
return c.json({ error: "Session not found or expired" }, 404);
|
|
178686
178717
|
}
|
|
178687
|
-
|
|
178688
|
-
sessionStore.getOrCreate(sessionId, sessionIdentity);
|
|
178689
|
-
}
|
|
178718
|
+
const sessionId = providedSessionId ?? generateSecureSessionId();
|
|
178690
178719
|
const transport = new McpSessionTransport(sessionId);
|
|
178691
178720
|
const handleRpc = async () => {
|
|
178692
178721
|
const server2 = await serverFactory();
|
|
178693
178722
|
await server2.connect(transport);
|
|
178694
178723
|
const response = await transport.handleRequest(c);
|
|
178695
|
-
if (response && config2.mcpSessionMode === "stateful") {
|
|
178696
|
-
response.headers.set("Mcp-Session-Id", sessionId);
|
|
178697
|
-
logger.debug("Added Mcp-Session-Id header to response", {
|
|
178698
|
-
...transportContext,
|
|
178699
|
-
sessionId
|
|
178700
|
-
});
|
|
178701
|
-
}
|
|
178702
178724
|
if (response) {
|
|
178725
|
+
if (sessionStore && response.ok) {
|
|
178726
|
+
sessionStore.getOrCreate(sessionId, sessionIdentity);
|
|
178727
|
+
}
|
|
178728
|
+
if (config2.mcpSessionMode === "stateful" && response.ok) {
|
|
178729
|
+
response.headers.set("Mcp-Session-Id", sessionId);
|
|
178730
|
+
logger.debug("Added Mcp-Session-Id header to response", {
|
|
178731
|
+
...transportContext,
|
|
178732
|
+
sessionId
|
|
178733
|
+
});
|
|
178734
|
+
}
|
|
178703
178735
|
return response;
|
|
178704
178736
|
}
|
|
178705
178737
|
return c.body(null, 204);
|
|
@@ -178718,7 +178750,7 @@ function createHttpApp(serverFactory, parentContext) {
|
|
|
178718
178750
|
}
|
|
178719
178751
|
});
|
|
178720
178752
|
logger.info("Hono application setup complete.", transportContext);
|
|
178721
|
-
return app;
|
|
178753
|
+
return { app, sessionStore };
|
|
178722
178754
|
}
|
|
178723
178755
|
function isPortInUse(port, host, parentContext) {
|
|
178724
178756
|
const context2 = { ...parentContext, operation: "isPortInUse", port, host };
|
|
@@ -178783,18 +178815,22 @@ async function startHttpTransport(serverFactory, parentContext) {
|
|
|
178783
178815
|
component: "HttpTransportStart"
|
|
178784
178816
|
};
|
|
178785
178817
|
logger.info("Starting HTTP transport.", transportContext);
|
|
178786
|
-
const app = createHttpApp(serverFactory, transportContext);
|
|
178818
|
+
const { app, sessionStore } = createHttpApp(serverFactory, transportContext);
|
|
178787
178819
|
const server2 = await startHttpServerWithRetry(app, config2.mcpHttpPort, config2.mcpHttpHost, config2.mcpHttpMaxPortRetries, transportContext);
|
|
178788
178820
|
logger.info("HTTP transport started successfully.", transportContext);
|
|
178789
|
-
return
|
|
178821
|
+
return {
|
|
178822
|
+
server: server2,
|
|
178823
|
+
stop: (ctx) => stopHttpTransport(server2, sessionStore, ctx)
|
|
178824
|
+
};
|
|
178790
178825
|
}
|
|
178791
|
-
function stopHttpTransport(server2, parentContext) {
|
|
178826
|
+
function stopHttpTransport(server2, sessionStore, parentContext) {
|
|
178792
178827
|
const operationContext = {
|
|
178793
178828
|
...parentContext,
|
|
178794
178829
|
operation: "stopHttpTransport",
|
|
178795
178830
|
transportType: "Http"
|
|
178796
178831
|
};
|
|
178797
178832
|
logger.info("Attempting to stop http transport...", operationContext);
|
|
178833
|
+
sessionStore?.destroy();
|
|
178798
178834
|
return new Promise((resolve, reject) => {
|
|
178799
178835
|
server2.close((err) => {
|
|
178800
178836
|
if (err) {
|
|
@@ -178958,9 +178994,9 @@ class TransportManager {
|
|
|
178958
178994
|
});
|
|
178959
178995
|
this.logger.info(`Starting transport: ${this.config.mcpTransportType}`, context2);
|
|
178960
178996
|
if (this.config.mcpTransportType === "http") {
|
|
178961
|
-
const
|
|
178962
|
-
this.serverInstance =
|
|
178963
|
-
this.shutdown = (ctx) =>
|
|
178997
|
+
const handle = await startHttpTransport(this.createMcpServer, context2);
|
|
178998
|
+
this.serverInstance = handle.server;
|
|
178999
|
+
this.shutdown = (ctx) => handle.stop(ctx);
|
|
178964
179000
|
} else if (this.config.mcpTransportType === "stdio") {
|
|
178965
179001
|
const mcpServer = await this.createMcpServer();
|
|
178966
179002
|
this.serverInstance = await startStdioTransport(mcpServer, context2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-ts-template",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.7",
|
|
4
4
|
"mcpName": "io.github.cyanheads/mcp-ts-template",
|
|
5
5
|
"description": "TypeScript template for MCP servers with declarative tools/resources, pluggable auth, multi-backend storage, OpenTelemetry observability, and Cloudflare Workers support.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@cloudflare/workers-types": "^4.20260305.1",
|
|
82
|
-
"@biomejs/biome": "2.4.
|
|
82
|
+
"@biomejs/biome": "2.4.6",
|
|
83
83
|
"@hono/mcp": "^0.2.4",
|
|
84
84
|
"@traversable/registry": "^0.0.49",
|
|
85
85
|
"@traversable/zod-test": "^0.0.28",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"@types/bun": "^1.3.10",
|
|
88
88
|
"@types/diff": "^8.0.0",
|
|
89
89
|
"@types/js-yaml": "^4.0.9",
|
|
90
|
-
"@types/node": "^25.3.
|
|
90
|
+
"@types/node": "^25.3.5",
|
|
91
91
|
"@types/node-cron": "^3.0.11",
|
|
92
92
|
"@types/papaparse": "^5.5.2",
|
|
93
93
|
"@types/sanitize-html": "^2.16.0",
|
|
@@ -175,10 +175,10 @@
|
|
|
175
175
|
"dotenv": "^17.3.1",
|
|
176
176
|
"fast-xml-parser": "^5.4.2",
|
|
177
177
|
"hono": "^4.12.5",
|
|
178
|
-
"jose": "^6.
|
|
178
|
+
"jose": "^6.2.0",
|
|
179
179
|
"js-yaml": "^4.1.1",
|
|
180
180
|
"node-cron": "^4.2.1",
|
|
181
|
-
"openai": "^6.
|
|
181
|
+
"openai": "^6.27.0",
|
|
182
182
|
"papaparse": "^5.5.3",
|
|
183
183
|
"partial-json": "^0.1.7",
|
|
184
184
|
"pdf-lib": "^1.17.1",
|