modality-kit 0.16.0 → 0.16.1

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.
Files changed (2) hide show
  1. package/dist/index.js +15 -4
  2. 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: (newValue) => all[name] = () => newValue
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: 5
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 && keyResult.issues.some((iss) => iss.code === "invalid_type" && iss.expected === "number");
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;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.16.0",
2
+ "version": "0.16.1",
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.24.2",
17
- "modality-bun-kit": "^0.0.1",
18
- "zod": "^4.3.5"
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",