mcp-ts-template 2.3.3 → 2.3.4
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 +94 -93
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
<div align="center">
|
|
7
7
|
|
|
8
|
-
[](./CHANGELOG.md) [](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2025-06-18/changelog.mdx) [](https://modelcontextprotocol.io/) [](./LICENSE) [](https://github.com/cyanheads/mcp-ts-template/issues) [](https://www.typescriptlang.org/) [](https://bun.sh/) [](./coverage/lcov-report/)
|
|
9
9
|
|
|
10
10
|
</div>
|
|
11
11
|
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
38
38
|
var require_package = __commonJS((exports, module) => {
|
|
39
39
|
module.exports = {
|
|
40
40
|
name: "dotenv",
|
|
41
|
-
version: "17.2.
|
|
41
|
+
version: "17.2.3",
|
|
42
42
|
description: "Loads environment variables from .env file",
|
|
43
43
|
main: "lib/main.js",
|
|
44
44
|
types: "lib/main.d.ts",
|
|
@@ -60,8 +60,8 @@ var require_package = __commonJS((exports, module) => {
|
|
|
60
60
|
"dts-check": "tsc --project tests/types/tsconfig.json",
|
|
61
61
|
lint: "standard",
|
|
62
62
|
pretest: "npm run lint && npm run dts-check",
|
|
63
|
-
test: "tap run --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
64
|
-
"test:coverage": "tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
63
|
+
test: "tap run tests/**/*.js --allow-empty-coverage --disable-coverage --timeout=60000",
|
|
64
|
+
"test:coverage": "tap run tests/**/*.js --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov",
|
|
65
65
|
prerelease: "npm test",
|
|
66
66
|
release: "standard-version"
|
|
67
67
|
},
|
|
@@ -112,9 +112,12 @@ var require_main = __commonJS((exports, module) => {
|
|
|
112
112
|
"\uD83D\uDD10 encrypt with Dotenvx: https://dotenvx.com",
|
|
113
113
|
"\uD83D\uDD10 prevent committing .env to code: https://dotenvx.com/precommit",
|
|
114
114
|
"\uD83D\uDD10 prevent building .env in docker: https://dotenvx.com/prebuild",
|
|
115
|
-
"\uD83D\uDCE1
|
|
116
|
-
"\uD83D\
|
|
117
|
-
"\uD83D\
|
|
115
|
+
"\uD83D\uDCE1 add observability to secrets: https://dotenvx.com/ops",
|
|
116
|
+
"\uD83D\uDC65 sync secrets across teammates & machines: https://dotenvx.com/ops",
|
|
117
|
+
"\uD83D\uDDC2️ backup and recover secrets: https://dotenvx.com/ops",
|
|
118
|
+
"✅ audit secrets and track compliance: https://dotenvx.com/ops",
|
|
119
|
+
"\uD83D\uDD04 add secrets lifecycle management: https://dotenvx.com/ops",
|
|
120
|
+
"\uD83D\uDD11 add access controls to secrets: https://dotenvx.com/ops",
|
|
118
121
|
"\uD83D\uDEE0️ run anywhere with `dotenvx run -- yourcommand`",
|
|
119
122
|
"⚙️ specify custom .env file path with { path: '/custom/path/.env' }",
|
|
120
123
|
"⚙️ enable debug logging with { debug: true }",
|
|
@@ -78941,17 +78944,7 @@ var require_tools = __commonJS((exports, module) => {
|
|
|
78941
78944
|
} = require_symbols2();
|
|
78942
78945
|
var { isMainThread } = __require("worker_threads");
|
|
78943
78946
|
var transport = require_transport2();
|
|
78944
|
-
var asJsonChan;
|
|
78945
|
-
if (typeof diagChan.tracingChannel === "function") {
|
|
78946
|
-
asJsonChan = diagChan.tracingChannel("pino_asJson");
|
|
78947
|
-
} else {
|
|
78948
|
-
asJsonChan = {
|
|
78949
|
-
hasSubscribers: false,
|
|
78950
|
-
traceSync(fn, store, thisArg, ...args) {
|
|
78951
|
-
return fn.call(thisArg, ...args);
|
|
78952
|
-
}
|
|
78953
|
-
};
|
|
78954
|
-
}
|
|
78947
|
+
var asJsonChan = diagChan.tracingChannel("pino_asJson");
|
|
78955
78948
|
function noop() {}
|
|
78956
78949
|
function genLog(level, hook) {
|
|
78957
78950
|
if (!hook)
|
|
@@ -79114,7 +79107,7 @@ var require_tools = __commonJS((exports, module) => {
|
|
|
79114
79107
|
bindings = formatter(bindings);
|
|
79115
79108
|
for (const key in bindings) {
|
|
79116
79109
|
value = bindings[key];
|
|
79117
|
-
const valid = key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels" && bindings.hasOwnProperty(key) && value !== undefined;
|
|
79110
|
+
const valid = (key.length < 5 || key !== "level" && key !== "serializers" && key !== "formatters" && key !== "customLevels") && bindings.hasOwnProperty(key) && value !== undefined;
|
|
79118
79111
|
if (valid === true) {
|
|
79119
79112
|
value = serializers[key] ? serializers[key](value) : value;
|
|
79120
79113
|
value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe);
|
|
@@ -79442,7 +79435,7 @@ var require_levels = __commonJS((exports, module) => {
|
|
|
79442
79435
|
|
|
79443
79436
|
// node_modules/pino/lib/meta.js
|
|
79444
79437
|
var require_meta = __commonJS((exports, module) => {
|
|
79445
|
-
module.exports = { version: "
|
|
79438
|
+
module.exports = { version: "10.0.0" };
|
|
79446
79439
|
});
|
|
79447
79440
|
|
|
79448
79441
|
// node_modules/pino/lib/proto.js
|
|
@@ -79488,7 +79481,8 @@ var require_proto = __commonJS((exports, module) => {
|
|
|
79488
79481
|
asChindings,
|
|
79489
79482
|
asJson,
|
|
79490
79483
|
buildFormatters,
|
|
79491
|
-
stringify
|
|
79484
|
+
stringify,
|
|
79485
|
+
noop
|
|
79492
79486
|
} = require_tools();
|
|
79493
79487
|
var {
|
|
79494
79488
|
version
|
|
@@ -79537,10 +79531,19 @@ var require_proto = __commonJS((exports, module) => {
|
|
|
79537
79531
|
if (!bindings2) {
|
|
79538
79532
|
throw Error("missing bindings for child Pino");
|
|
79539
79533
|
}
|
|
79540
|
-
options = options || {};
|
|
79541
79534
|
const serializers = this[serializersSym];
|
|
79542
79535
|
const formatters = this[formattersSym];
|
|
79543
79536
|
const instance = Object.create(this);
|
|
79537
|
+
if (options == null) {
|
|
79538
|
+
if (instance[formattersSym].bindings !== resetChildingsFormatter) {
|
|
79539
|
+
instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
|
|
79540
|
+
}
|
|
79541
|
+
instance[chindingsSym] = asChindings(instance, bindings2);
|
|
79542
|
+
if (this.onChild !== noop) {
|
|
79543
|
+
this.onChild(instance);
|
|
79544
|
+
}
|
|
79545
|
+
return instance;
|
|
79546
|
+
}
|
|
79544
79547
|
if (options.hasOwnProperty("serializers") === true) {
|
|
79545
79548
|
instance[serializersSym] = Object.create(null);
|
|
79546
79549
|
for (const k in serializers) {
|
|
@@ -79642,7 +79645,6 @@ var require_proto = __commonJS((exports, module) => {
|
|
|
79642
79645
|
}
|
|
79643
79646
|
stream.write(streamWriteHook ? streamWriteHook(s) : s);
|
|
79644
79647
|
}
|
|
79645
|
-
function noop() {}
|
|
79646
79648
|
function flush(cb) {
|
|
79647
79649
|
if (cb != null && typeof cb !== "function") {
|
|
79648
79650
|
throw Error("callback must be a function");
|
|
@@ -117552,33 +117554,33 @@ var package_default = {
|
|
|
117552
117554
|
resolutions: {
|
|
117553
117555
|
"@hono/node-server": "1.19.5",
|
|
117554
117556
|
"chrono-node": "2.9.0",
|
|
117555
|
-
dotenv: "17.2.
|
|
117557
|
+
dotenv: "17.2.3",
|
|
117556
117558
|
hono: "4.9.9",
|
|
117557
117559
|
zod: "3.23.8",
|
|
117558
|
-
typescript: "5.9.
|
|
117560
|
+
typescript: "5.9.3"
|
|
117559
117561
|
},
|
|
117560
117562
|
dependencies: {
|
|
117561
117563
|
"@hono/mcp": "^0.1.4",
|
|
117562
117564
|
"@hono/node-server": "^1.19.5",
|
|
117563
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
117565
|
+
"@modelcontextprotocol/sdk": "^1.19.1",
|
|
117564
117566
|
"@supabase/supabase-js": "^2.58.0",
|
|
117565
117567
|
axios: "^1.12.2",
|
|
117566
117568
|
"chrono-node": "^2.9.0",
|
|
117567
|
-
dotenv: "^17.2.
|
|
117568
|
-
"fast-xml-parser": "^5.
|
|
117569
|
+
dotenv: "^17.2.3",
|
|
117570
|
+
"fast-xml-parser": "^5.3.0",
|
|
117569
117571
|
hono: "^4.9.9",
|
|
117570
117572
|
ignore: "^7.0.5",
|
|
117571
117573
|
jose: "^6.1.0",
|
|
117572
117574
|
"js-yaml": "^4.1.0",
|
|
117573
117575
|
"node-cron": "^4.2.1",
|
|
117574
|
-
openai: "^6.0
|
|
117576
|
+
openai: "^6.1.0",
|
|
117575
117577
|
papaparse: "^5.5.3",
|
|
117576
117578
|
"partial-json": "^0.1.7",
|
|
117577
117579
|
"pdf-lib": "^1.17.1",
|
|
117578
|
-
pino: "^
|
|
117580
|
+
pino: "^10.0.0",
|
|
117579
117581
|
"pino-pretty": "^13.1.1",
|
|
117580
117582
|
"reflect-metadata": "^0.2.2",
|
|
117581
|
-
repomix: "^1.6.
|
|
117583
|
+
repomix: "^1.6.1",
|
|
117582
117584
|
"sanitize-html": "^2.17.0",
|
|
117583
117585
|
tslib: "^2.8.1",
|
|
117584
117586
|
tsyringe: "^4.10.0",
|
|
@@ -117596,8 +117598,8 @@ var package_default = {
|
|
|
117596
117598
|
"@opentelemetry/semantic-conventions": "^1.37.0"
|
|
117597
117599
|
},
|
|
117598
117600
|
devDependencies: {
|
|
117599
|
-
"@cloudflare/workers-types": "^4.
|
|
117600
|
-
"@eslint/js": "^9.
|
|
117601
|
+
"@cloudflare/workers-types": "^4.20251004.0",
|
|
117602
|
+
"@eslint/js": "^9.37.0",
|
|
117601
117603
|
"@types/bun": "^1.2.23",
|
|
117602
117604
|
"@types/js-yaml": "^4.0.9",
|
|
117603
117605
|
"@types/node": "^24.6.2",
|
|
@@ -117611,7 +117613,7 @@ var package_default = {
|
|
|
117611
117613
|
"bun-types": "^1.2.23",
|
|
117612
117614
|
clipboardy: "^5.0.0",
|
|
117613
117615
|
depcheck: "^1.4.7",
|
|
117614
|
-
eslint: "^9.
|
|
117616
|
+
eslint: "^9.37.0",
|
|
117615
117617
|
execa: "^9.6.0",
|
|
117616
117618
|
globals: "^16.4.0",
|
|
117617
117619
|
husky: "^9.1.7",
|
|
@@ -117620,7 +117622,7 @@ var package_default = {
|
|
|
117620
117622
|
typedoc: "^0.28.13",
|
|
117621
117623
|
typescript: "^5.9.2",
|
|
117622
117624
|
"typescript-eslint": "8.45.0",
|
|
117623
|
-
vite: "^7.1.
|
|
117625
|
+
vite: "^7.1.9",
|
|
117624
117626
|
"vite-tsconfig-paths": "^5.1.4",
|
|
117625
117627
|
vitest: "^3.2.4"
|
|
117626
117628
|
},
|
|
@@ -119781,7 +119783,7 @@ var safeJSON = (text) => {
|
|
|
119781
119783
|
var sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
119782
119784
|
|
|
119783
119785
|
// node_modules/openai/version.mjs
|
|
119784
|
-
var VERSION = "6.0
|
|
119786
|
+
var VERSION = "6.1.0";
|
|
119785
119787
|
|
|
119786
119788
|
// node_modules/openai/internal/detect-platform.mjs
|
|
119787
119789
|
var isRunningInBrowser = () => {
|
|
@@ -123815,6 +123817,37 @@ class Moderations extends APIResource {
|
|
|
123815
123817
|
return this._client.post("/moderations", { body, ...options });
|
|
123816
123818
|
}
|
|
123817
123819
|
}
|
|
123820
|
+
// node_modules/openai/resources/realtime/calls.mjs
|
|
123821
|
+
class Calls extends APIResource {
|
|
123822
|
+
accept(callID, body, options) {
|
|
123823
|
+
return this._client.post(path`/realtime/calls/${callID}/accept`, {
|
|
123824
|
+
body,
|
|
123825
|
+
...options,
|
|
123826
|
+
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
123827
|
+
});
|
|
123828
|
+
}
|
|
123829
|
+
hangup(callID, options) {
|
|
123830
|
+
return this._client.post(path`/realtime/calls/${callID}/hangup`, {
|
|
123831
|
+
...options,
|
|
123832
|
+
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
123833
|
+
});
|
|
123834
|
+
}
|
|
123835
|
+
refer(callID, body, options) {
|
|
123836
|
+
return this._client.post(path`/realtime/calls/${callID}/refer`, {
|
|
123837
|
+
body,
|
|
123838
|
+
...options,
|
|
123839
|
+
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
123840
|
+
});
|
|
123841
|
+
}
|
|
123842
|
+
reject(callID, body = {}, options) {
|
|
123843
|
+
return this._client.post(path`/realtime/calls/${callID}/reject`, {
|
|
123844
|
+
body,
|
|
123845
|
+
...options,
|
|
123846
|
+
headers: buildHeaders([{ Accept: "*/*" }, options?.headers])
|
|
123847
|
+
});
|
|
123848
|
+
}
|
|
123849
|
+
}
|
|
123850
|
+
|
|
123818
123851
|
// node_modules/openai/resources/realtime/client-secrets.mjs
|
|
123819
123852
|
class ClientSecrets extends APIResource {
|
|
123820
123853
|
create(body, options) {
|
|
@@ -123827,9 +123860,11 @@ class Realtime2 extends APIResource {
|
|
|
123827
123860
|
constructor() {
|
|
123828
123861
|
super(...arguments);
|
|
123829
123862
|
this.clientSecrets = new ClientSecrets(this._client);
|
|
123863
|
+
this.calls = new Calls(this._client);
|
|
123830
123864
|
}
|
|
123831
123865
|
}
|
|
123832
123866
|
Realtime2.ClientSecrets = ClientSecrets;
|
|
123867
|
+
Realtime2.Calls = Calls;
|
|
123833
123868
|
// node_modules/openai/lib/ResponsesParser.mjs
|
|
123834
123869
|
function maybeParseResponse(response, params) {
|
|
123835
123870
|
if (!params || !hasAutoParseableInput2(params)) {
|
|
@@ -126702,12 +126737,7 @@ var allResourceDefinitions = [echoResourceDefinition];
|
|
|
126702
126737
|
|
|
126703
126738
|
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
126704
126739
|
var LATEST_PROTOCOL_VERSION = "2025-06-18";
|
|
126705
|
-
var SUPPORTED_PROTOCOL_VERSIONS = [
|
|
126706
|
-
LATEST_PROTOCOL_VERSION,
|
|
126707
|
-
"2025-03-26",
|
|
126708
|
-
"2024-11-05",
|
|
126709
|
-
"2024-10-07"
|
|
126710
|
-
];
|
|
126740
|
+
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
126711
126741
|
var JSONRPC_VERSION = "2.0";
|
|
126712
126742
|
var ProgressTokenSchema = z.union([z.string(), z.number().int()]);
|
|
126713
126743
|
var CursorSchema = z.string();
|
|
@@ -126767,12 +126797,7 @@ var JSONRPCErrorSchema = z.object({
|
|
|
126767
126797
|
})
|
|
126768
126798
|
}).strict();
|
|
126769
126799
|
var isJSONRPCError = (value) => JSONRPCErrorSchema.safeParse(value).success;
|
|
126770
|
-
var JSONRPCMessageSchema = z.union([
|
|
126771
|
-
JSONRPCRequestSchema,
|
|
126772
|
-
JSONRPCNotificationSchema,
|
|
126773
|
-
JSONRPCResponseSchema,
|
|
126774
|
-
JSONRPCErrorSchema
|
|
126775
|
-
]);
|
|
126800
|
+
var JSONRPCMessageSchema = z.union([JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, JSONRPCErrorSchema]);
|
|
126776
126801
|
var EmptyResultSchema = ResultSchema.strict();
|
|
126777
126802
|
var CancelledNotificationSchema = NotificationSchema.extend({
|
|
126778
126803
|
method: z.literal("notifications/cancelled"),
|
|
@@ -126784,7 +126809,10 @@ var CancelledNotificationSchema = NotificationSchema.extend({
|
|
|
126784
126809
|
var IconSchema = z.object({
|
|
126785
126810
|
src: z.string(),
|
|
126786
126811
|
mimeType: z.optional(z.string()),
|
|
126787
|
-
sizes: z.optional(z.string())
|
|
126812
|
+
sizes: z.optional(z.array(z.string()))
|
|
126813
|
+
}).passthrough();
|
|
126814
|
+
var IconsSchema = z.object({
|
|
126815
|
+
icons: z.array(IconSchema).optional()
|
|
126788
126816
|
}).passthrough();
|
|
126789
126817
|
var BaseMetadataSchema = z.object({
|
|
126790
126818
|
name: z.string(),
|
|
@@ -126792,9 +126820,8 @@ var BaseMetadataSchema = z.object({
|
|
|
126792
126820
|
}).passthrough();
|
|
126793
126821
|
var ImplementationSchema = BaseMetadataSchema.extend({
|
|
126794
126822
|
version: z.string(),
|
|
126795
|
-
websiteUrl: z.optional(z.string())
|
|
126796
|
-
|
|
126797
|
-
});
|
|
126823
|
+
websiteUrl: z.optional(z.string())
|
|
126824
|
+
}).merge(IconsSchema);
|
|
126798
126825
|
var ClientCapabilitiesSchema = z.object({
|
|
126799
126826
|
experimental: z.optional(z.object({}).passthrough()),
|
|
126800
126827
|
sampling: z.optional(z.object({}).passthrough()),
|
|
@@ -126881,15 +126908,14 @@ var ResourceSchema = BaseMetadataSchema.extend({
|
|
|
126881
126908
|
uri: z.string(),
|
|
126882
126909
|
description: z.optional(z.string()),
|
|
126883
126910
|
mimeType: z.optional(z.string()),
|
|
126884
|
-
icons: z.optional(z.array(IconSchema)),
|
|
126885
126911
|
_meta: z.optional(z.object({}).passthrough())
|
|
126886
|
-
});
|
|
126912
|
+
}).merge(IconsSchema);
|
|
126887
126913
|
var ResourceTemplateSchema = BaseMetadataSchema.extend({
|
|
126888
126914
|
uriTemplate: z.string(),
|
|
126889
126915
|
description: z.optional(z.string()),
|
|
126890
126916
|
mimeType: z.optional(z.string()),
|
|
126891
126917
|
_meta: z.optional(z.object({}).passthrough())
|
|
126892
|
-
});
|
|
126918
|
+
}).merge(IconsSchema);
|
|
126893
126919
|
var ListResourcesRequestSchema = PaginatedRequestSchema.extend({
|
|
126894
126920
|
method: z.literal("resources/list")
|
|
126895
126921
|
});
|
|
@@ -126940,9 +126966,8 @@ var PromptArgumentSchema = z.object({
|
|
|
126940
126966
|
var PromptSchema = BaseMetadataSchema.extend({
|
|
126941
126967
|
description: z.optional(z.string()),
|
|
126942
126968
|
arguments: z.optional(z.array(PromptArgumentSchema)),
|
|
126943
|
-
icons: z.optional(z.array(IconSchema)),
|
|
126944
126969
|
_meta: z.optional(z.object({}).passthrough())
|
|
126945
|
-
});
|
|
126970
|
+
}).merge(IconsSchema);
|
|
126946
126971
|
var ListPromptsRequestSchema = PaginatedRequestSchema.extend({
|
|
126947
126972
|
method: z.literal("prompts/list")
|
|
126948
126973
|
});
|
|
@@ -127019,9 +127044,8 @@ var ToolSchema = BaseMetadataSchema.extend({
|
|
|
127019
127044
|
required: z.optional(z.array(z.string()))
|
|
127020
127045
|
}).passthrough()),
|
|
127021
127046
|
annotations: z.optional(ToolAnnotationsSchema),
|
|
127022
|
-
icons: z.optional(z.array(IconSchema)),
|
|
127023
127047
|
_meta: z.optional(z.object({}).passthrough())
|
|
127024
|
-
});
|
|
127048
|
+
}).merge(IconsSchema);
|
|
127025
127049
|
var ListToolsRequestSchema = PaginatedRequestSchema.extend({
|
|
127026
127050
|
method: z.literal("tools/list")
|
|
127027
127051
|
});
|
|
@@ -127046,16 +127070,7 @@ var CallToolRequestSchema = RequestSchema.extend({
|
|
|
127046
127070
|
var ToolListChangedNotificationSchema = NotificationSchema.extend({
|
|
127047
127071
|
method: z.literal("notifications/tools/list_changed")
|
|
127048
127072
|
});
|
|
127049
|
-
var LoggingLevelSchema = z.enum([
|
|
127050
|
-
"debug",
|
|
127051
|
-
"info",
|
|
127052
|
-
"notice",
|
|
127053
|
-
"warning",
|
|
127054
|
-
"error",
|
|
127055
|
-
"critical",
|
|
127056
|
-
"alert",
|
|
127057
|
-
"emergency"
|
|
127058
|
-
]);
|
|
127073
|
+
var LoggingLevelSchema = z.enum(["debug", "info", "notice", "warning", "error", "critical", "alert", "emergency"]);
|
|
127059
127074
|
var SetLevelRequestSchema = RequestSchema.extend({
|
|
127060
127075
|
method: z.literal("logging/setLevel"),
|
|
127061
127076
|
params: BaseRequestParamsSchema.extend({
|
|
@@ -127100,11 +127115,7 @@ var CreateMessageResultSchema = ResultSchema.extend({
|
|
|
127100
127115
|
model: z.string(),
|
|
127101
127116
|
stopReason: z.optional(z.enum(["endTurn", "stopSequence", "maxTokens"]).or(z.string())),
|
|
127102
127117
|
role: z.enum(["user", "assistant"]),
|
|
127103
|
-
content: z.discriminatedUnion("type", [
|
|
127104
|
-
TextContentSchema,
|
|
127105
|
-
ImageContentSchema,
|
|
127106
|
-
AudioContentSchema
|
|
127107
|
-
])
|
|
127118
|
+
content: z.discriminatedUnion("type", [TextContentSchema, ImageContentSchema, AudioContentSchema])
|
|
127108
127119
|
});
|
|
127109
127120
|
var BooleanSchemaSchema = z.object({
|
|
127110
127121
|
type: z.literal("boolean"),
|
|
@@ -127134,12 +127145,7 @@ var EnumSchemaSchema = z.object({
|
|
|
127134
127145
|
enum: z.array(z.string()),
|
|
127135
127146
|
enumNames: z.optional(z.array(z.string()))
|
|
127136
127147
|
}).passthrough();
|
|
127137
|
-
var PrimitiveSchemaDefinitionSchema = z.union([
|
|
127138
|
-
BooleanSchemaSchema,
|
|
127139
|
-
StringSchemaSchema,
|
|
127140
|
-
NumberSchemaSchema,
|
|
127141
|
-
EnumSchemaSchema
|
|
127142
|
-
]);
|
|
127148
|
+
var PrimitiveSchemaDefinitionSchema = z.union([BooleanSchemaSchema, StringSchemaSchema, NumberSchemaSchema, EnumSchemaSchema]);
|
|
127143
127149
|
var ElicitRequestSchema = RequestSchema.extend({
|
|
127144
127150
|
method: z.literal("elicitation/create"),
|
|
127145
127151
|
params: BaseRequestParamsSchema.extend({
|
|
@@ -127218,18 +127224,8 @@ var ClientNotificationSchema = z.union([
|
|
|
127218
127224
|
InitializedNotificationSchema,
|
|
127219
127225
|
RootsListChangedNotificationSchema
|
|
127220
127226
|
]);
|
|
127221
|
-
var ClientResultSchema = z.union([
|
|
127222
|
-
|
|
127223
|
-
CreateMessageResultSchema,
|
|
127224
|
-
ElicitResultSchema,
|
|
127225
|
-
ListRootsResultSchema
|
|
127226
|
-
]);
|
|
127227
|
-
var ServerRequestSchema = z.union([
|
|
127228
|
-
PingRequestSchema,
|
|
127229
|
-
CreateMessageRequestSchema,
|
|
127230
|
-
ElicitRequestSchema,
|
|
127231
|
-
ListRootsRequestSchema
|
|
127232
|
-
]);
|
|
127227
|
+
var ClientResultSchema = z.union([EmptyResultSchema, CreateMessageResultSchema, ElicitResultSchema, ListRootsResultSchema]);
|
|
127228
|
+
var ServerRequestSchema = z.union([PingRequestSchema, CreateMessageRequestSchema, ElicitRequestSchema, ListRootsRequestSchema]);
|
|
127233
127229
|
var ServerNotificationSchema = z.union([
|
|
127234
127230
|
CancelledNotificationSchema,
|
|
127235
127231
|
ProgressNotificationSchema,
|
|
@@ -127301,7 +127297,10 @@ class Protocol {
|
|
|
127301
127297
|
const totalElapsed = Date.now() - info.startTime;
|
|
127302
127298
|
if (info.maxTotalTimeout && totalElapsed >= info.maxTotalTimeout) {
|
|
127303
127299
|
this._timeoutInfo.delete(messageId);
|
|
127304
|
-
throw new McpError2(ErrorCode.RequestTimeout, "Maximum total timeout exceeded", {
|
|
127300
|
+
throw new McpError2(ErrorCode.RequestTimeout, "Maximum total timeout exceeded", {
|
|
127301
|
+
maxTotalTimeout: info.maxTotalTimeout,
|
|
127302
|
+
totalElapsed
|
|
127303
|
+
});
|
|
127305
127304
|
}
|
|
127306
127305
|
clearTimeout(info.timeoutId);
|
|
127307
127306
|
info.timeoutId = setTimeout(info.onTimeout, info.timeout);
|
|
@@ -129353,7 +129352,9 @@ class McpServer {
|
|
|
129353
129352
|
_meta: tool._meta
|
|
129354
129353
|
};
|
|
129355
129354
|
if (tool.outputSchema) {
|
|
129356
|
-
toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, {
|
|
129355
|
+
toolDefinition.outputSchema = zodToJsonSchema(tool.outputSchema, {
|
|
129356
|
+
strictUnions: true
|
|
129357
|
+
});
|
|
129357
129358
|
}
|
|
129358
129359
|
return toolDefinition;
|
|
129359
129360
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-ts-template",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.4",
|
|
4
4
|
"mcpName": "io.github.cyanheads/mcp-ts-template",
|
|
5
5
|
"description": "The definitive, production-grade template for building powerful and scalable Model Context Protocol (MCP) servers with TypeScript, featuring built-in observability (OpenTelemetry), declarative tooling, robust error handling, and a modular, DI-driven architecture.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -61,33 +61,33 @@
|
|
|
61
61
|
"resolutions": {
|
|
62
62
|
"@hono/node-server": "1.19.5",
|
|
63
63
|
"chrono-node": "2.9.0",
|
|
64
|
-
"dotenv": "17.2.
|
|
64
|
+
"dotenv": "17.2.3",
|
|
65
65
|
"hono": "4.9.9",
|
|
66
66
|
"zod": "3.23.8",
|
|
67
|
-
"typescript": "5.9.
|
|
67
|
+
"typescript": "5.9.3"
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
70
|
"@hono/mcp": "^0.1.4",
|
|
71
71
|
"@hono/node-server": "^1.19.5",
|
|
72
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
72
|
+
"@modelcontextprotocol/sdk": "^1.19.1",
|
|
73
73
|
"@supabase/supabase-js": "^2.58.0",
|
|
74
74
|
"axios": "^1.12.2",
|
|
75
75
|
"chrono-node": "^2.9.0",
|
|
76
|
-
"dotenv": "^17.2.
|
|
77
|
-
"fast-xml-parser": "^5.
|
|
76
|
+
"dotenv": "^17.2.3",
|
|
77
|
+
"fast-xml-parser": "^5.3.0",
|
|
78
78
|
"hono": "^4.9.9",
|
|
79
79
|
"ignore": "^7.0.5",
|
|
80
80
|
"jose": "^6.1.0",
|
|
81
81
|
"js-yaml": "^4.1.0",
|
|
82
82
|
"node-cron": "^4.2.1",
|
|
83
|
-
"openai": "^6.0
|
|
83
|
+
"openai": "^6.1.0",
|
|
84
84
|
"papaparse": "^5.5.3",
|
|
85
85
|
"partial-json": "^0.1.7",
|
|
86
86
|
"pdf-lib": "^1.17.1",
|
|
87
|
-
"pino": "^
|
|
87
|
+
"pino": "^10.0.0",
|
|
88
88
|
"pino-pretty": "^13.1.1",
|
|
89
89
|
"reflect-metadata": "^0.2.2",
|
|
90
|
-
"repomix": "^1.6.
|
|
90
|
+
"repomix": "^1.6.1",
|
|
91
91
|
"sanitize-html": "^2.17.0",
|
|
92
92
|
"tslib": "^2.8.1",
|
|
93
93
|
"tsyringe": "^4.10.0",
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
"@opentelemetry/semantic-conventions": "^1.37.0"
|
|
106
106
|
},
|
|
107
107
|
"devDependencies": {
|
|
108
|
-
"@cloudflare/workers-types": "^4.
|
|
109
|
-
"@eslint/js": "^9.
|
|
108
|
+
"@cloudflare/workers-types": "^4.20251004.0",
|
|
109
|
+
"@eslint/js": "^9.37.0",
|
|
110
110
|
"@types/bun": "^1.2.23",
|
|
111
111
|
"@types/js-yaml": "^4.0.9",
|
|
112
112
|
"@types/node": "^24.6.2",
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"bun-types": "^1.2.23",
|
|
121
121
|
"clipboardy": "^5.0.0",
|
|
122
122
|
"depcheck": "^1.4.7",
|
|
123
|
-
"eslint": "^9.
|
|
123
|
+
"eslint": "^9.37.0",
|
|
124
124
|
"execa": "^9.6.0",
|
|
125
125
|
"globals": "^16.4.0",
|
|
126
126
|
"husky": "^9.1.7",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"typedoc": "^0.28.13",
|
|
130
130
|
"typescript": "^5.9.2",
|
|
131
131
|
"typescript-eslint": "8.45.0",
|
|
132
|
-
"vite": "^7.1.
|
|
132
|
+
"vite": "^7.1.9",
|
|
133
133
|
"vite-tsconfig-paths": "^5.1.4",
|
|
134
134
|
"vitest": "^3.2.4"
|
|
135
135
|
},
|