modality-kit 0.16.0 → 0.16.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/dist/index.js +18 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/types/isTestEnvironment.d.ts +1 -0
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
|
+
var __returnValue = (v) => v;
|
|
3
|
+
function __exportSetter(name, newValue) {
|
|
4
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
5
|
+
}
|
|
2
6
|
var __export = (target, all) => {
|
|
3
7
|
for (var name in all)
|
|
4
8
|
__defProp(target, name, {
|
|
5
9
|
get: all[name],
|
|
6
10
|
enumerable: true,
|
|
7
11
|
configurable: true,
|
|
8
|
-
set: (
|
|
12
|
+
set: __exportSetter.bind(all, name)
|
|
9
13
|
});
|
|
10
14
|
};
|
|
11
15
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
@@ -73,6 +77,13 @@ function formatSuccessResponse(successData, content) {
|
|
|
73
77
|
if (contetnBlock.length > 0) {
|
|
74
78
|
result.content.push(...contetnBlock);
|
|
75
79
|
}
|
|
80
|
+
if (process.env.DEBUG) {
|
|
81
|
+
const size = JSON.stringify(result).length;
|
|
82
|
+
result.content.push({
|
|
83
|
+
type: "text",
|
|
84
|
+
text: `Response size: ${size} bytes`
|
|
85
|
+
});
|
|
86
|
+
}
|
|
76
87
|
return result;
|
|
77
88
|
}
|
|
78
89
|
function formatErrorResponse(errorData, operation, meta) {
|
|
@@ -2550,7 +2561,7 @@ class Doc {
|
|
|
2550
2561
|
var version = {
|
|
2551
2562
|
major: 4,
|
|
2552
2563
|
minor: 3,
|
|
2553
|
-
patch:
|
|
2564
|
+
patch: 6
|
|
2554
2565
|
};
|
|
2555
2566
|
|
|
2556
2567
|
// node_modules/zod/v4/core/schemas.js
|
|
@@ -3836,7 +3847,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
3836
3847
|
if (keyResult instanceof Promise) {
|
|
3837
3848
|
throw new Error("Async schemas not supported in object keys currently");
|
|
3838
3849
|
}
|
|
3839
|
-
const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length
|
|
3850
|
+
const checkNumericKey = typeof key === "string" && number.test(key) && keyResult.issues.length;
|
|
3840
3851
|
if (checkNumericKey) {
|
|
3841
3852
|
const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);
|
|
3842
3853
|
if (retryResult instanceof Promise) {
|
|
@@ -11207,7 +11218,7 @@ function finalize(ctx, schema) {
|
|
|
11207
11218
|
}
|
|
11208
11219
|
}
|
|
11209
11220
|
}
|
|
11210
|
-
if (refSchema.$ref) {
|
|
11221
|
+
if (refSchema.$ref && refSeen.def) {
|
|
11211
11222
|
for (const key in schema2) {
|
|
11212
11223
|
if (key === "$ref" || key === "allOf")
|
|
11213
11224
|
continue;
|
|
@@ -15584,10 +15595,13 @@ class SimpleCache {
|
|
|
15584
15595
|
return this.lruCache.keys();
|
|
15585
15596
|
}
|
|
15586
15597
|
}
|
|
15598
|
+
// src/isTestEnvironment.ts
|
|
15599
|
+
var isTestEnvironment = globalThis.Bun?.main?.includes?.("test");
|
|
15587
15600
|
export {
|
|
15588
15601
|
withErrorHandling,
|
|
15589
15602
|
mergeResponsesContent,
|
|
15590
15603
|
loadVersion,
|
|
15604
|
+
isTestEnvironment,
|
|
15591
15605
|
getLoggerInstance,
|
|
15592
15606
|
formatSuccessResponse,
|
|
15593
15607
|
formatErrorResponse,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,5 +21,6 @@ export { ERROR_METHOD_NOT_FOUND } from "./jsonrpc-manager";
|
|
|
21
21
|
export { WebSocketClient } from "./websocket-client";
|
|
22
22
|
export { LruCache } from "./lruCache";
|
|
23
23
|
export { SimpleCache } from "./simple-cache";
|
|
24
|
+
export { isTestEnvironment } from "./isTestEnvironment";
|
|
24
25
|
export type { SimpleCacheOptions } from "./simple-cache";
|
|
25
26
|
export type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isTestEnvironment: boolean;
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.16.
|
|
2
|
+
"version": "0.16.2",
|
|
3
3
|
"name": "modality-kit",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"author": "Hill <hill@kimo.com>",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
17
|
-
"modality-bun-kit": "^0.0.
|
|
18
|
-
"zod": "^4.3.
|
|
16
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
17
|
+
"modality-bun-kit": "^0.0.3",
|
|
18
|
+
"zod": "^4.3.6"
|
|
19
19
|
},
|
|
20
20
|
"exports": {
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|