@workit-dev/mcp 2.20.4 → 2.20.6

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 +31 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -22681,6 +22681,8 @@ var GENERATED_GITIGNORES2 = new Set([`*
22681
22681
  `, `*
22682
22682
  !risk-paths
22683
22683
  `]);
22684
+ var CHECK_HEAVY = [true, "io"];
22685
+ var CHECK_KEYS = ["command", "heavy"];
22684
22686
  var isRecord2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
22685
22687
  var SHELL_META = /[|&;<>()$`\\*?[\]{}~!#]/u;
22686
22688
  function splitCommand(command) {
@@ -22877,10 +22879,10 @@ function loadCheckConfig(cwd) {
22877
22879
  for (const [name, value] of Object.entries(parsed.checks)) {
22878
22880
  if (!CHECK_NAME.test(name))
22879
22881
  return none(`${label}: check name "${name}" must match ${CHECK_NAME.source}`);
22880
- const argv = typeof value === "string" ? splitCommand(value) : Array.isArray(value) && value.length > 0 && value.every((item) => typeof item === "string" && item.length > 0) ? value : new Error("expected a command string or a non-empty argv array");
22881
- if (argv instanceof Error)
22882
- return none(`${label}: check "${name}": ${argv.message}`);
22883
- checks.push({ name, argv, accepts: [argv] });
22882
+ const check = checkEntry(value);
22883
+ if (check instanceof Error)
22884
+ return none(`${label}: check "${name}": ${check.message}`);
22885
+ checks.push({ name, argv: check.argv, accepts: [check.argv], ...check.heavy });
22884
22886
  }
22885
22887
  const gates = {};
22886
22888
  if (parsed.gates !== undefined) {
@@ -22924,6 +22926,31 @@ function loadCheckConfig(cwd) {
22924
22926
  regenerable
22925
22927
  };
22926
22928
  }
22929
+ function commandArgv(value) {
22930
+ if (typeof value === "string")
22931
+ return splitCommand(value);
22932
+ return Array.isArray(value) && value.length > 0 && value.every((item) => typeof item === "string" && item.length > 0) ? value : new Error("expected a command string or a non-empty argv array");
22933
+ }
22934
+ function checkEntry(value) {
22935
+ if (!isRecord2(value)) {
22936
+ const argv = commandArgv(value);
22937
+ return argv instanceof Error ? argv : { argv, heavy: {} };
22938
+ }
22939
+ const unknown = Object.keys(value).find((key) => !CHECK_KEYS.includes(key));
22940
+ if (unknown)
22941
+ return new Error(`"${unknown}" is not a check setting (use ${CHECK_KEYS.join(" or ")})`);
22942
+ if (value.command === undefined)
22943
+ return new Error('needs "command": a command string or a non-empty argv array');
22944
+ const argv = commandArgv(value.command);
22945
+ if (argv instanceof Error)
22946
+ return new Error(`command: ${argv.message}`);
22947
+ if (value.heavy === undefined)
22948
+ return { argv, heavy: {} };
22949
+ const heavy = CHECK_HEAVY.find((allowed) => allowed === value.heavy);
22950
+ if (heavy === undefined)
22951
+ return new Error(`heavy must be ${CHECK_HEAVY.map((allowed) => JSON.stringify(allowed)).join(" or ")}, not ${JSON.stringify(value.heavy)}`);
22952
+ return { argv, heavy: { heavy } };
22953
+ }
22927
22954
  var sameArgv = (left, right) => left.length === right.length && left.every((item, index) => item === right[index]);
22928
22955
  function matchesNamedCheck(config, name, argv, cwd) {
22929
22956
  if (config.error || name === null || cwd !== ".")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "2.20.4",
3
+ "version": "2.20.6",
4
4
  "private": false,
5
5
  "description": "Workit shared MCP transport for the eight task and policy operation families",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@modelcontextprotocol/sdk": "1.32.0",
47
- "@workit-dev/core": "^2.20.4",
47
+ "@workit-dev/core": "^2.20.6",
48
48
  "zod": "4.6.5"
49
49
  },
50
50
  "engines": {