@workit-dev/mcp 2.21.1 → 2.21.3

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 +38 -2
  2. package/package.json +4 -4
package/dist/index.js CHANGED
@@ -6972,6 +6972,18 @@ function prefixIssues(path, issues) {
6972
6972
  function unwrapMessage(message) {
6973
6973
  return typeof message === "string" ? message : message?.message;
6974
6974
  }
6975
+ function sizeCaps(defChecks) {
6976
+ const caps = [];
6977
+ for (const ch of defChecks ?? []) {
6978
+ const d = ch._zod.def;
6979
+ if (!/_(length|size)$|_equals$/.test(d.check))
6980
+ break;
6981
+ const max = d.maximum ?? d.length ?? d.size;
6982
+ if (max >= 0)
6983
+ caps.push([max, ch]);
6984
+ }
6985
+ return caps;
6986
+ }
6975
6987
  function attachSchema(issues, start, inst) {
6976
6988
  var _a;
6977
6989
  for (let i = start;i < issues.length; i++) {
@@ -7971,7 +7983,7 @@ ${content.join(`
7971
7983
  var version = {
7972
7984
  major: 4,
7973
7985
  minor: 6,
7974
- patch: 5
7986
+ patch: 7
7975
7987
  };
7976
7988
 
7977
7989
  // node_modules/zod/v4/core/schemas.js
@@ -8540,6 +8552,29 @@ var $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
8540
8552
  return payload;
8541
8553
  };
8542
8554
  });
8555
+ function capSize(inst, size) {
8556
+ const caps = sizeCaps(inst._zod.def.checks);
8557
+ if (!caps.length)
8558
+ return;
8559
+ const cap = Math.min(...caps.map((c) => c[0]));
8560
+ const parse = inst._zod.parse;
8561
+ inst._zod.parse = (payload, ctx) => {
8562
+ const n = size(payload.value);
8563
+ if (n > cap && !ctx?.skipChecks && ctx?.direction !== "backward") {
8564
+ for (const [max, ch] of sizeCaps(inst._zod.def.checks)) {
8565
+ if (n > max && ch._zod.def.when(payload)) {
8566
+ const start = payload.issues.length;
8567
+ ch._zod.check(payload);
8568
+ payload.issues[start].continue = false;
8569
+ attachSchema(payload.issues, start, inst);
8570
+ return payload;
8571
+ }
8572
+ }
8573
+ }
8574
+ return parse(payload, ctx);
8575
+ };
8576
+ }
8577
+ var arraySize = (input) => Array.isArray(input) ? input.length : -1;
8543
8578
  function handleArrayResult(result, final, index) {
8544
8579
  if (result.issues.length) {
8545
8580
  final.issues.push(...prefixIssues(index, result.issues));
@@ -8583,6 +8618,7 @@ var $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
8583
8618
  }
8584
8619
  return payload;
8585
8620
  };
8621
+ capSize(inst, arraySize);
8586
8622
  });
8587
8623
  function handlePropertyResult(result, final, key, input, optin, optout) {
8588
8624
  const isPresent = key in input;
@@ -20056,7 +20092,7 @@ function normalizeMaxBytes(value, options = {}) {
20056
20092
  if (selected === undefined || selected === Number.POSITIVE_INFINITY)
20057
20093
  return selected;
20058
20094
  if (!Number.isSafeInteger(selected) || selected < 0) {
20059
- throw new RangeError(`${options.label ?? "maxBytes"} must be a non-negative safe integer or Infinity`);
20095
+ throw new RangeError("maxBytes must be a non-negative safe integer or Infinity");
20060
20096
  }
20061
20097
  return selected;
20062
20098
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "2.21.1",
3
+ "version": "2.21.3",
4
4
  "private": false,
5
5
  "description": "Workit shared MCP transport for the eight task and policy operation families",
6
6
  "keywords": [
@@ -43,9 +43,9 @@
43
43
  "build": "bun scripts/build.ts"
44
44
  },
45
45
  "dependencies": {
46
- "@modelcontextprotocol/sdk": "1.32.0",
47
- "@workit-dev/core": "^2.21.1",
48
- "zod": "4.6.5"
46
+ "@modelcontextprotocol/sdk": "1.32.2",
47
+ "@workit-dev/core": "^2.21.3",
48
+ "zod": "4.6.7"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=24"