@workit-dev/mcp 1.0.3 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.js +6 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -23542,6 +23542,7 @@ var DOC_EXT = /\.(?:md|mdx|markdown|rst|adoc)$/iu;
23542
23542
  var DOC_NAMES = /^(?:license|licence|notice|authors|changelog|changes|contributors)$/iu;
23543
23543
  var INSTRUCTIONS = /(?:^|\/)(?:AGENTS|CLAUDE|GEMINI|SKILL)\.md$|(?:^|\/)(?:skills|agents|commands|rules|prompts)\/[^/]+/iu;
23544
23544
  var TEST_PATH = /(?:^|\/)(?:test|tests|__tests__)\/|\.(?:test|spec)\.[^/]+$|_test\.[^/]+$/iu;
23545
+ var plural = (count, noun) => `${count} ${noun}${count === 1 ? "" : "s"}`;
23545
23546
  var basename = (file) => file.slice(file.lastIndexOf("/") + 1);
23546
23547
  var isDoc = (file) => !INSTRUCTIONS.test(file) && (DOC_EXT.test(file) || DOC_NAMES.test(basename(file)));
23547
23548
  function kindOf(file) {
@@ -23600,6 +23601,8 @@ function computeLane(input) {
23600
23601
  const behavior = kinds.filter((entry) => entry.kind === "behavior" || entry.kind === "test" || entry.kind === "lockfile");
23601
23602
  const lines = behavior.filter((entry) => entry.kind !== "lockfile").reduce((sum, entry) => sum + entry.file.added + entry.file.deleted, 0);
23602
23603
  const opaque = behavior.filter((entry) => entry.kind === "lockfile" || entry.file.binary);
23604
+ const diffLines = input.files.reduce((sum, file) => sum + file.added + file.deleted, 0);
23605
+ const counted = diffLines === lines && input.files.length === behavior.length ? "" : ` counted (the whole diff is ${plural(diffLines, "line")} in ${plural(input.files.length, "file")}; docs, comments, formatting, generated copies and lockfile lines are not counted)`;
23603
23606
  const result = (lane, reasons) => ({
23604
23607
  lane,
23605
23608
  reasons,
@@ -23619,9 +23622,9 @@ function computeLane(input) {
23619
23622
  input.files.length ? "only docs, comments, formatting or generated copies changed" : "no changes"
23620
23623
  ]);
23621
23624
  if (lines >= fullMinLines)
23622
- return result("full", [`large diff: ${lines} lines (≥ ${fullMinLines})`]);
23625
+ return result("full", [`large diff: ${lines} lines (≥ ${fullMinLines})${counted}`]);
23623
23626
  if (lines > selfMaxLines)
23624
- return result("focused", [`${lines} lines changed (> ${selfMaxLines})`]);
23627
+ return result("focused", [`${lines} lines changed (> ${selfMaxLines})${counted}`]);
23625
23628
  if (behavior.length > selfMaxFiles)
23626
23629
  return result("focused", [`${behavior.length} behavior files changed (> ${selfMaxFiles})`]);
23627
23630
  if (opaque.length)
@@ -23629,7 +23632,7 @@ function computeLane(input) {
23629
23632
  `a lockfile or binary changed: ${opaque.slice(0, 3).map((entry) => entry.file.path).join(", ")}${opaque.length > 3 ? ", …" : ""}`
23630
23633
  ]);
23631
23634
  return result("self", [
23632
- `small change: ${lines} line${lines === 1 ? "" : "s"} in ${behavior.length} file${behavior.length === 1 ? "" : "s"}, no risk path`
23635
+ `small change: ${plural(lines, "line")} in ${plural(behavior.length, "file")}${counted}, no risk path`
23633
23636
  ]);
23634
23637
  }
23635
23638
  function untrackedStat(cwd, file) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
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": "^1.0.3",
47
+ "@workit-dev/core": "^1.0.4",
48
48
  "zod": "4.6.5"
49
49
  },
50
50
  "engines": {