@workit-dev/mcp 2.4.1 → 2.4.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.
Files changed (2) hide show
  1. package/dist/index.js +39 -39
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -6623,7 +6623,7 @@ import { fileURLToPath as fileURLToPath3 } from "node:url";
6623
6623
  import path31 from "node:path";
6624
6624
 
6625
6625
  // packages/workit-mcp/src/server.ts
6626
- import { existsSync as existsSync12, readFileSync as readFileSync11, realpathSync as realpathSync9 } from "node:fs";
6626
+ import { existsSync as existsSync13, readFileSync as readFileSync11, realpathSync as realpathSync10 } from "node:fs";
6627
6627
  import path30 from "node:path";
6628
6628
 
6629
6629
  // node_modules/zod/v4/core/util.js
@@ -14937,7 +14937,7 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
14937
14937
 
14938
14938
  // packages/workit-core/src/core.ts
14939
14939
  import { spawnSync as spawnSync20 } from "node:child_process";
14940
- import { existsSync as existsSync11, realpathSync as realpathSync8 } from "node:fs";
14940
+ import { existsSync as existsSync12, realpathSync as realpathSync9 } from "node:fs";
14941
14941
  import path29 from "node:path";
14942
14942
 
14943
14943
  // packages/workit-core/src/core/task-contract.ts
@@ -16702,11 +16702,11 @@ var gitContext = (workspaceRoot, paths = []) => {
16702
16702
  // packages/workit-core/src/core/workspaces.ts
16703
16703
  import { spawnSync as spawnSync6 } from "node:child_process";
16704
16704
  import { createHash as createHash3 } from "node:crypto";
16705
- import { existsSync as existsSync2, lstatSync as lstatSync2, readFileSync as readFileSync4, realpathSync as realpathSync2 } from "node:fs";
16705
+ import { existsSync as existsSync3, lstatSync as lstatSync2, readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
16706
16706
  import path7 from "node:path";
16707
16707
 
16708
16708
  // packages/workit-core/src/core/remotes.ts
16709
- import { lstatSync, readFileSync as readFileSync3, realpathSync, statSync } from "node:fs";
16709
+ import { lstatSync, readFileSync as readFileSync3, realpathSync as realpathSync2, statSync } from "node:fs";
16710
16710
  import { spawnSync as spawnSync5 } from "node:child_process";
16711
16711
  import path6 from "node:path";
16712
16712
 
@@ -17532,7 +17532,7 @@ function resolveSshHost(alias, sshConfig) {
17532
17532
 
17533
17533
  // packages/workit-core/src/core/account-home.ts
17534
17534
  import { spawnSync as spawnSync4 } from "node:child_process";
17535
- import { readFileSync as readFileSync2 } from "node:fs";
17535
+ import { existsSync as existsSync2, readFileSync as readFileSync2, realpathSync } from "node:fs";
17536
17536
  import os3 from "node:os";
17537
17537
  var WINDOWS = "C:\\Windows";
17538
17538
  var SYSTEM32 = `${WINDOWS}\\System32\\`;
@@ -17633,7 +17633,7 @@ var isRepoDir = (dir) => ["HEAD", "objects", "refs"].every((name) => {
17633
17633
  var gitDirAt = (at, depth = 0) => {
17634
17634
  let real;
17635
17635
  try {
17636
- real = realpathSync.native(at);
17636
+ real = realpathSync2.native(at);
17637
17637
  } catch {
17638
17638
  return null;
17639
17639
  }
@@ -17665,7 +17665,7 @@ var gitDirAt = (at, depth = 0) => {
17665
17665
  } catch {
17666
17666
  continue;
17667
17667
  }
17668
- const resolved = realpathSync.native(item);
17668
+ const resolved = realpathSync2.native(item);
17669
17669
  const rel = path6.relative(real, resolved);
17670
17670
  if (rel && !rel.startsWith("..") && !path6.isAbsolute(rel))
17671
17671
  continue;
@@ -18092,8 +18092,8 @@ var probeCheckout = (cwd) => {
18092
18092
  if (cached !== undefined)
18093
18093
  return cached;
18094
18094
  let dir = path7.resolve(cwd);
18095
- while (!existsSync2(path7.join(dir, ".git"))) {
18096
- if (["HEAD", "objects", "refs"].every((name) => existsSync2(path7.join(dir, name)))) {
18095
+ while (!existsSync3(path7.join(dir, ".git"))) {
18096
+ if (["HEAD", "objects", "refs"].every((name) => existsSync3(path7.join(dir, name)))) {
18097
18097
  const real = realpathOf(dir);
18098
18098
  const owner = ownInternals(real) === true ? gitDirOwner(real) : null;
18099
18099
  if (owner === null)
@@ -18177,7 +18177,7 @@ var ownInternals = (real) => {
18177
18177
  }
18178
18178
  let resolved;
18179
18179
  try {
18180
- resolved = (realpathSync2.native ?? realpathSync2)(at);
18180
+ resolved = (realpathSync3.native ?? realpathSync3)(at);
18181
18181
  } catch {
18182
18182
  return false;
18183
18183
  }
@@ -18235,7 +18235,7 @@ var matchingEntries = (cwd, entries) => {
18235
18235
  return main ? match(main) : direct;
18236
18236
  };
18237
18237
  var realpathOf = (p) => {
18238
- const real = realpathSync2.native ?? realpathSync2;
18238
+ const real = realpathSync3.native ?? realpathSync3;
18239
18239
  try {
18240
18240
  return real(p);
18241
18241
  } catch {
@@ -20592,14 +20592,14 @@ function acquireFileLockSync(targetPath, options) {
20592
20592
  }
20593
20593
  }
20594
20594
  // packages/workit-core/src/core/package-root.ts
20595
- import { existsSync as existsSync3 } from "node:fs";
20595
+ import { existsSync as existsSync4 } from "node:fs";
20596
20596
  import path14 from "node:path";
20597
20597
  import { fileURLToPath } from "node:url";
20598
20598
  var packageRoot = () => {
20599
20599
  let dir = path14.dirname(fileURLToPath(import.meta.url));
20600
20600
  while (true) {
20601
20601
  const parent = path14.dirname(dir);
20602
- if (existsSync3(path14.join(dir, "package.json")) || parent === dir)
20602
+ if (existsSync4(path14.join(dir, "package.json")) || parent === dir)
20603
20603
  return dir;
20604
20604
  dir = parent;
20605
20605
  }
@@ -20607,7 +20607,7 @@ var packageRoot = () => {
20607
20607
  var assetRoot = () => {
20608
20608
  const root = packageRoot();
20609
20609
  const assets = path14.join(root, "assets");
20610
- return existsSync3(assets) ? assets : root;
20610
+ return existsSync4(assets) ? assets : root;
20611
20611
  };
20612
20612
 
20613
20613
  // packages/workit-core/src/core/store-lock.ts
@@ -23004,7 +23004,7 @@ var PM_RUN = new Set(["run", "run-script"]);
23004
23004
  var PYTHON_RUNNERS = new Set(["uv", "poetry", "pipenv", "pdm", "hatch", "rye"]);
23005
23005
 
23006
23006
  // packages/workit-core/src/core/policy/derive.ts
23007
- import { existsSync as existsSync7 } from "node:fs";
23007
+ import { existsSync as existsSync8 } from "node:fs";
23008
23008
  import path20 from "node:path";
23009
23009
 
23010
23010
  // packages/workit-core/src/ledger.ts
@@ -23091,7 +23091,7 @@ function bookkeepingPaths(cwd, input) {
23091
23091
  }
23092
23092
 
23093
23093
  // packages/workit-core/src/core/policy/lane.ts
23094
- import { existsSync as existsSync6, readFileSync as readFileSync7 } from "node:fs";
23094
+ import { existsSync as existsSync7, readFileSync as readFileSync7 } from "node:fs";
23095
23095
  import path18 from "node:path";
23096
23096
 
23097
23097
  // packages/workit-core/src/git/default-base.ts
@@ -25133,7 +25133,7 @@ var productDecision = (task, ledger) => {
25133
25133
  };
25134
25134
  };
25135
25135
  var planRecorded = (task, root) => {
25136
- const cited = (latestJudgment(task)?.refs ?? []).find((ref) => ref.kind === "external" || ref.kind === "file" && existsSync7(path20.resolve(root, ref.path)));
25136
+ const cited = (latestJudgment(task)?.refs ?? []).find((ref) => ref.kind === "external" || ref.kind === "file" && existsSync8(path20.resolve(root, ref.path)));
25137
25137
  if (cited)
25138
25138
  return {
25139
25139
  met: true,
@@ -26211,7 +26211,7 @@ var exportDigest = (bundle) => sha256({
26211
26211
  import path24 from "node:path";
26212
26212
 
26213
26213
  // packages/workit-core/src/core/eval-world.ts
26214
- import { existsSync as existsSync9, realpathSync as realpathSync5 } from "node:fs";
26214
+ import { existsSync as existsSync10, realpathSync as realpathSync6 } from "node:fs";
26215
26215
  import os5 from "node:os";
26216
26216
  import path22 from "node:path";
26217
26217
  var EVAL_WORLD_ENV = "WORKIT_EVAL_WORLD";
@@ -26225,8 +26225,8 @@ var evalWorld = (cwd) => {
26225
26225
  if (!raw || !path22.isAbsolute(raw))
26226
26226
  return null;
26227
26227
  try {
26228
- const world = realpathSync5(raw);
26229
- return inside2(realpathSync5(os5.tmpdir()), world) && inside2(world, realpathSync5(cwd)) && existsSync9(path22.join(world, EVAL_WORLD_MARKER)) ? world : null;
26228
+ const world = realpathSync6(raw);
26229
+ return inside2(realpathSync6(os5.tmpdir()), world) && inside2(world, realpathSync6(cwd)) && existsSync10(path22.join(world, EVAL_WORLD_MARKER)) ? world : null;
26230
26230
  } catch {
26231
26231
  return null;
26232
26232
  }
@@ -26756,7 +26756,7 @@ var BRANCH_RENAME = new Set(["-m", "-M", "--move", "-c", "-C", "--copy"]);
26756
26756
  var WORKTREE_VALUES = new Set(["--reason"]);
26757
26757
  var FETCH_VALUES = new Set(["--depth", "--deepen", "--shallow-since", "--shallow-exclude", "--refmap", "-j", "--jobs"].concat(["--upload-pack", "-o", "--server-option", "--negotiation-tip", "--filter"]).concat(["--recurse-submodules-default", "--submodule-prefix", "-s", "--strategy", "-X"]).concat(["--strategy-option"]));
26758
26758
  // packages/workit-core/src/core/task-engine.ts
26759
- import { realpathSync as realpathSync7 } from "node:fs";
26759
+ import { realpathSync as realpathSync8 } from "node:fs";
26760
26760
 
26761
26761
  // packages/workit-core/src/core/policy-resolver.ts
26762
26762
  function resolvePolicy(input) {
@@ -27005,12 +27005,12 @@ var judgeInputSummary = (raw) => {
27005
27005
  };
27006
27006
 
27007
27007
  // packages/workit-core/src/core/task-view.ts
27008
- import { realpathSync as realpathSync6 } from "node:fs";
27008
+ import { realpathSync as realpathSync7 } from "node:fs";
27009
27009
  var environment = () => [];
27010
27010
  var sameSession2 = (value, context) => typeof value === "object" && value !== null && value.kind === "host" && value.host === context.caller.host && value.handle === context.caller.actor;
27011
27011
  function contextRootError(store, context) {
27012
27012
  try {
27013
- realpathSync6(context.root);
27013
+ realpathSync7(context.root);
27014
27014
  const root = checkoutRootOf(context.root);
27015
27015
  if (root !== store.root && !sameDirectoryIdentity(root, store.root))
27016
27016
  return failure2("invalid_input", "operation context root does not match the task store root");
@@ -28480,7 +28480,7 @@ class WorkitCore {
28480
28480
  if (view.task.workspaceId !== view.workspace.id)
28481
28481
  return failure2("invalid_input", "task and workspace bindings are invalid");
28482
28482
  try {
28483
- if (realpathSync7(view.workspace.root) !== this.store.root)
28483
+ if (realpathSync8(view.workspace.root) !== this.store.root)
28484
28484
  return failure2("invalid_input", "task view root does not match the task store");
28485
28485
  } catch {
28486
28486
  return failure2("invalid_input", "task view root cannot be resolved");
@@ -28731,7 +28731,7 @@ class WorkitCore {
28731
28731
  }
28732
28732
  // packages/workit-core/src/core/repo-context.ts
28733
28733
  import { spawnSync as spawnSync16 } from "node:child_process";
28734
- import { existsSync as existsSync10, readFileSync as readFileSync10, readdirSync as readdirSync4 } from "node:fs";
28734
+ import { existsSync as existsSync11, readFileSync as readFileSync10, readdirSync as readdirSync4 } from "node:fs";
28735
28735
  import path25 from "node:path";
28736
28736
  var isSafeContextRange = (value) => value.length <= 4096 && (() => {
28737
28737
  try {
@@ -28913,7 +28913,7 @@ var diffStatForRange = (cwd, range) => {
28913
28913
  };
28914
28914
  var packageScripts = (cwd, keys) => {
28915
28915
  const pkgPath = path25.join(cwd, "package.json");
28916
- if (!existsSync10(pkgPath))
28916
+ if (!existsSync11(pkgPath))
28917
28917
  return [];
28918
28918
  try {
28919
28919
  const pkg = JSON.parse(readFileSync10(pkgPath, "utf8"));
@@ -28948,7 +28948,7 @@ var documentationFiles = (cwd) => {
28948
28948
  return matches.toSorted().slice(0, 200);
28949
28949
  };
28950
28950
  var readTrimmed2 = (file, maxLines) => {
28951
- if (!existsSync10(file))
28951
+ if (!existsSync11(file))
28952
28952
  return "";
28953
28953
  const lines = readFileSync10(file, "utf8").split(`
28954
28954
  `);
@@ -29024,7 +29024,7 @@ ${status.stderr}` : "");
29024
29024
  stdout += `
29025
29025
  `;
29026
29026
  stdout += printSection("Recent Validation Signals");
29027
- if (existsSync10(path25.join(cwd, "package.json"))) {
29027
+ if (existsSync11(path25.join(cwd, "package.json"))) {
29028
29028
  stdout += `package.json detected. Common scripts:
29029
29029
  `;
29030
29030
  const found = packageScripts(cwd, ["lint", "format:check", "test", "build"]);
@@ -29033,7 +29033,7 @@ ${status.stderr}` : "");
29033
29033
  `) + `
29034
29034
  `;
29035
29035
  }
29036
- if (existsSync10(path25.join(cwd, "Cargo.toml")) || existsSync10(path25.join(cwd, "src-tauri/Cargo.toml"))) {
29036
+ if (existsSync11(path25.join(cwd, "Cargo.toml")) || existsSync11(path25.join(cwd, "src-tauri/Cargo.toml"))) {
29037
29037
  stdout += `Rust project detected.
29038
29038
  `;
29039
29039
  }
@@ -29085,7 +29085,7 @@ function changelogContext(root, range) {
29085
29085
  `;
29086
29086
  stdout += printSection("Existing CHANGELOG.md");
29087
29087
  const changelogPath = path25.join(cwd, "CHANGELOG.md");
29088
- if (existsSync10(changelogPath)) {
29088
+ if (existsSync11(changelogPath)) {
29089
29089
  stdout += readTrimmed2(changelogPath, 260) + `
29090
29090
  `;
29091
29091
  } else {
@@ -29127,7 +29127,7 @@ function docsRefreshContext(root, range) {
29127
29127
  `;
29128
29128
  stdout += printSection("README Preview");
29129
29129
  const readme = path25.join(cwd, "README.md");
29130
- if (existsSync10(readme)) {
29130
+ if (existsSync11(readme)) {
29131
29131
  stdout += readTrimmed2(readme, 220) + `
29132
29132
  `;
29133
29133
  } else {
@@ -29136,7 +29136,7 @@ function docsRefreshContext(root, range) {
29136
29136
  }
29137
29137
  stdout += printSection("Package Scripts");
29138
29138
  const pkgPath = path25.join(cwd, "package.json");
29139
- if (existsSync10(pkgPath)) {
29139
+ if (existsSync11(pkgPath)) {
29140
29140
  try {
29141
29141
  const pkg = JSON.parse(readFileSync10(pkgPath, "utf8"));
29142
29142
  stdout += JSON.stringify({ name: pkg.name, version: pkg.version, scripts: pkg.scripts }, null, 2) + `
@@ -29192,7 +29192,7 @@ function releaseNotesContext(root, rangeOrTag) {
29192
29192
  `;
29193
29193
  stdout += printSection("Existing Release Files");
29194
29194
  for (const rel of ["CHANGELOG.md", "RELEASE_NOTES.md", ".github/releases.md"]) {
29195
- if (existsSync10(path25.join(cwd, rel)))
29195
+ if (existsSync11(path25.join(cwd, rel)))
29196
29196
  stdout += rel + `
29197
29197
  `;
29198
29198
  }
@@ -29794,22 +29794,22 @@ function resolveGitRevision(root, value) {
29794
29794
  }
29795
29795
  }
29796
29796
  function resolveInside(root, candidate) {
29797
- const base = realpathSync8(root);
29797
+ const base = realpathSync9(root);
29798
29798
  const target = path29.resolve(base, candidate);
29799
29799
  if (target !== base && !target.startsWith(base + path29.sep)) {
29800
29800
  throw new Error("path must stay inside repository root");
29801
29801
  }
29802
29802
  let ancestor = target;
29803
- while (!existsSync11(ancestor))
29803
+ while (!existsSync12(ancestor))
29804
29804
  ancestor = path29.dirname(ancestor);
29805
- const canonicalAncestor = realpathSync8(ancestor);
29805
+ const canonicalAncestor = realpathSync9(ancestor);
29806
29806
  if (canonicalAncestor !== base && !canonicalAncestor.startsWith(base + path29.sep)) {
29807
29807
  throw new Error("path must stay inside repository root");
29808
29808
  }
29809
29809
  return target;
29810
29810
  }
29811
29811
  function run2(root, executable, args, env = {}) {
29812
- const cwd = realpathSync8(root);
29812
+ const cwd = realpathSync9(root);
29813
29813
  const result = spawnSync20(executable, args, {
29814
29814
  cwd,
29815
29815
  encoding: "utf8",
@@ -29915,7 +29915,7 @@ var rootVariants = (workspaceRoot) => {
29915
29915
  roots.add(candidate);
29916
29916
  }
29917
29917
  try {
29918
- const canonical = realpathSync9(workspaceRoot);
29918
+ const canonical = realpathSync10(workspaceRoot);
29919
29919
  if (canonical !== path30.parse(canonical).root)
29920
29920
  roots.add(canonical);
29921
29921
  } catch {}
@@ -30003,7 +30003,7 @@ function createMcpServer(host, contextProvider) {
30003
30003
  path30.join(here, "server.ts"),
30004
30004
  path30.join(here, "..", "..", "workit-core", "src", "core", "task-contract.ts"),
30005
30005
  path30.join(here, "..", "..", "workit-core", "src", "core", "task-engine.ts")
30006
- ].filter((file) => existsSync12(file)));
30006
+ ].filter((file) => existsSync13(file)));
30007
30007
  let staleWarned = false;
30008
30008
  const failures = new Map;
30009
30009
  const server = new Server({ name: "workit", version: VERSION }, { capabilities: { tools: {}, resources: {} } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
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.4.1",
47
+ "@workit-dev/core": "^2.4.2",
48
48
  "zod": "4.6.5"
49
49
  },
50
50
  "engines": {