@workit-dev/mcp 1.4.2 → 1.5.0

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 +110 -65
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -6620,11 +6620,11 @@ var require_dist = __commonJS(function(exports, module) {
6620
6620
 
6621
6621
  // packages/workit-mcp/src/index.ts
6622
6622
  import { fileURLToPath as fileURLToPath3 } from "node:url";
6623
- import path28 from "node:path";
6623
+ import path29 from "node:path";
6624
6624
 
6625
6625
  // packages/workit-mcp/src/server.ts
6626
- import { existsSync as existsSync10, readFileSync as readFileSync8, realpathSync as realpathSync8 } from "node:fs";
6627
- import path27 from "node:path";
6626
+ import { existsSync as existsSync11, readFileSync as readFileSync8, realpathSync as realpathSync9 } from "node:fs";
6627
+ import path28 from "node:path";
6628
6628
 
6629
6629
  // node_modules/zod/v4/core/util.js
6630
6630
  function getEnumValues(entries) {
@@ -14937,8 +14937,8 @@ import { fileURLToPath as fileURLToPath2 } from "node:url";
14937
14937
 
14938
14938
  // packages/workit-core/src/core.ts
14939
14939
  import { spawnSync as spawnSync19 } from "node:child_process";
14940
- import { existsSync as existsSync9, realpathSync as realpathSync7 } from "node:fs";
14941
- import path26 from "node:path";
14940
+ import { existsSync as existsSync10, realpathSync as realpathSync8 } from "node:fs";
14941
+ import path27 from "node:path";
14942
14942
 
14943
14943
  // packages/workit-core/src/core/task-contract.ts
14944
14944
  import { createHash, randomUUID } from "node:crypto";
@@ -26124,20 +26124,64 @@ var exportDigest = (bundle) => sha256({
26124
26124
  task: bundle.task
26125
26125
  });
26126
26126
  // packages/workit-core/src/autonomy.ts
26127
+ import os6 from "node:os";
26128
+ import path22 from "node:path";
26129
+
26130
+ // packages/workit-core/src/core/eval-world.ts
26131
+ import { existsSync as existsSync8, realpathSync as realpathSync5 } from "node:fs";
26127
26132
  import os5 from "node:os";
26128
26133
  import path21 from "node:path";
26134
+ var EVAL_WORLD_ENV = "WORKIT_EVAL_WORLD";
26135
+ var EVAL_WORLD_MARKER = ".workit-eval-world";
26136
+ var inside2 = (dir, file) => {
26137
+ const rel = path21.relative(dir, file);
26138
+ return !rel.startsWith("..") && !path21.isAbsolute(rel);
26139
+ };
26140
+ var evalWorldEntry = (cwd) => {
26141
+ const raw = process.env[EVAL_WORLD_ENV];
26142
+ if (!raw || !path21.isAbsolute(raw))
26143
+ return null;
26144
+ try {
26145
+ const world = realpathSync5(raw);
26146
+ if (!inside2(realpathSync5(os5.tmpdir()), world) || !inside2(world, realpathSync5(cwd)) || !existsSync8(path21.join(world, EVAL_WORLD_MARKER)))
26147
+ return null;
26148
+ return loadWorkspacesFrom(path21.join(world, "config"))[0] ?? null;
26149
+ } catch {
26150
+ return null;
26151
+ }
26152
+ };
26153
+
26154
+ // packages/workit-core/src/autonomy.ts
26129
26155
  var accountHome2 = () => {
26130
26156
  try {
26131
- return os5.userInfo().homedir;
26157
+ return os6.userInfo().homedir;
26132
26158
  } catch {
26133
- return os5.homedir();
26159
+ return os6.homedir();
26134
26160
  }
26135
26161
  };
26136
26162
  var grantsHome = { resolve: accountHome2 };
26137
26163
  var grantsDir = () => configDir({ HOME: grantsHome.resolve() });
26164
+ var benchWorld = (cwd) => {
26165
+ const entry = evalWorldEntry(cwd);
26166
+ if (!entry)
26167
+ return null;
26168
+ const { grants } = configuredGrants(entry);
26169
+ const lowered = {};
26170
+ for (const kind of GRANT_KINDS) {
26171
+ const value = grants[kind];
26172
+ if (value !== undefined && raises(kind, value, DEFAULT_GRANTS[kind]))
26173
+ lowered[kind] = value;
26174
+ }
26175
+ return {
26176
+ name: entry.name,
26177
+ glob: entry.glob,
26178
+ ...entry.defaultEndpoint ? { defaultEndpoint: entry.defaultEndpoint } : {},
26179
+ autonomy: lowered
26180
+ };
26181
+ };
26138
26182
  var grantsOverride = () => {
26139
- const configured = path21.resolve(resolveConfigDir());
26140
- return configured === path21.resolve(grantsDir()) ? null : `the config directory is redirected to ${configured} (WORKIT_CONFIG, WORKIT_CONFIG_DIR or XDG_CONFIG_HOME), but that override does not apply to grants: grants are read only from ${path21.join(grantsDir(), "workspaces.json")}, so the D4 defaults apply until grants are set there`;
26183
+ const configured = path22.resolve(resolveConfigDir());
26184
+ return configured === path22.resolve(grantsDir()) ? null : `the config directory is redirected to ${configured} (WORKIT_CONFIG, WORKIT_CONFIG_DIR or XDG_CONFIG_HOME), but that override does not apply to grants: grants are read only from ${path22.join(grantsDir(), "workspaces.json")}, so the D4 defaults apply until grants are set there`;
26141
26185
  };
26142
26186
  var GRANT_KINDS = ["push", "pr", "merge", "release", "rerun"];
26143
26187
  var DEFAULT_GRANTS = Object.freeze({
@@ -26302,11 +26346,12 @@ function capAt(named, where, by, why, main = false) {
26302
26346
  };
26303
26347
  }
26304
26348
  function resolveAutonomy(cwd, target) {
26305
- const override = grantsOverride();
26349
+ const world = benchWorld(cwd);
26350
+ const override = world ? null : grantsOverride();
26306
26351
  if (override)
26307
26352
  return { ...autonomyOf(null), note: override };
26308
26353
  const name = process.env.WORKIT_WORKSPACE_NAME?.trim() || undefined;
26309
- let autonomy = autonomyOf(resolveWorkspaceFrom(cwd, grantsDir(), name));
26354
+ let autonomy = autonomyOf(resolveWorkspaceFrom(cwd, grantsDir(), name) ?? world);
26310
26355
  if (name)
26311
26356
  autonomy = capAt(autonomy, cwd, `WORKIT_WORKSPACE_NAME=${name}`, "a name never raises grants");
26312
26357
  const above = checkoutsAbove(cwd);
@@ -26455,7 +26500,7 @@ var BRANCH_RENAME = new Set(["-m", "-M", "--move", "-c", "-C", "--copy"]);
26455
26500
  var WORKTREE_VALUES = new Set(["--reason"]);
26456
26501
  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"]));
26457
26502
  // packages/workit-core/src/core/task-engine.ts
26458
- import { realpathSync as realpathSync6 } from "node:fs";
26503
+ import { realpathSync as realpathSync7 } from "node:fs";
26459
26504
 
26460
26505
  // packages/workit-core/src/core/policy-resolver.ts
26461
26506
  function resolvePolicy(input) {
@@ -26704,12 +26749,12 @@ var judgeInputSummary = (raw) => {
26704
26749
  };
26705
26750
 
26706
26751
  // packages/workit-core/src/core/task-view.ts
26707
- import { realpathSync as realpathSync5 } from "node:fs";
26752
+ import { realpathSync as realpathSync6 } from "node:fs";
26708
26753
  var environment = () => [];
26709
26754
  var sameSession2 = (value, context) => typeof value === "object" && value !== null && value.kind === "host" && value.host === context.caller.host && value.handle === context.caller.actor;
26710
26755
  function contextRootError(store, context) {
26711
26756
  try {
26712
- realpathSync5(context.root);
26757
+ realpathSync6(context.root);
26713
26758
  const root = checkoutRootOf(context.root);
26714
26759
  if (root !== store.root && !sameDirectoryIdentity(root, store.root))
26715
26760
  return failure2("invalid_input", "operation context root does not match the task store root");
@@ -28179,7 +28224,7 @@ class WorkitCore {
28179
28224
  if (view.task.workspaceId !== view.workspace.id)
28180
28225
  return failure2("invalid_input", "task and workspace bindings are invalid");
28181
28226
  try {
28182
- if (realpathSync6(view.workspace.root) !== this.store.root)
28227
+ if (realpathSync7(view.workspace.root) !== this.store.root)
28183
28228
  return failure2("invalid_input", "task view root does not match the task store");
28184
28229
  } catch {
28185
28230
  return failure2("invalid_input", "task view root cannot be resolved");
@@ -28430,8 +28475,8 @@ class WorkitCore {
28430
28475
  }
28431
28476
  // packages/workit-core/src/core/repo-context.ts
28432
28477
  import { spawnSync as spawnSync15 } from "node:child_process";
28433
- import { existsSync as existsSync8, readFileSync as readFileSync7, readdirSync as readdirSync3 } from "node:fs";
28434
- import path22 from "node:path";
28478
+ import { existsSync as existsSync9, readFileSync as readFileSync7, readdirSync as readdirSync3 } from "node:fs";
28479
+ import path23 from "node:path";
28435
28480
  var isSafeContextRange = (value) => value.length <= 4096 && (() => {
28436
28481
  try {
28437
28482
  gitRevisionParts(value);
@@ -28575,13 +28620,13 @@ var findPrTemplate = (cwd) => {
28575
28620
  for (const rel of PR_TEMPLATE_FILES) {
28576
28621
  const parts = rel.split("/");
28577
28622
  const base = parts[parts.length - 1];
28578
- const dir = parts.length > 1 ? path22.join(cwd, ...parts.slice(0, -1)) : cwd;
28623
+ const dir = parts.length > 1 ? path23.join(cwd, ...parts.slice(0, -1)) : cwd;
28579
28624
  const actual = probeCaseInsensitive(dir, base);
28580
28625
  if (actual)
28581
28626
  return [...parts.slice(0, -1), actual].join("/");
28582
28627
  }
28583
28628
  for (const rel of PR_TEMPLATE_DIRS) {
28584
- const only = singleMarkdown(path22.join(cwd, ...rel.split("/")));
28629
+ const only = singleMarkdown(path23.join(cwd, ...rel.split("/")));
28585
28630
  if (only)
28586
28631
  return `${rel}/${only}`;
28587
28632
  }
@@ -28611,8 +28656,8 @@ var diffStatForRange = (cwd, range) => {
28611
28656
  return runGit(cwd, ["diff", "--stat", "--"]).stdout;
28612
28657
  };
28613
28658
  var packageScripts = (cwd, keys) => {
28614
- const pkgPath = path22.join(cwd, "package.json");
28615
- if (!existsSync8(pkgPath))
28659
+ const pkgPath = path23.join(cwd, "package.json");
28660
+ if (!existsSync9(pkgPath))
28616
28661
  return [];
28617
28662
  try {
28618
28663
  const pkg = JSON.parse(readFileSync7(pkgPath, "utf8"));
@@ -28637,9 +28682,9 @@ var documentationFiles = (cwd) => {
28637
28682
  if (entry.isDirectory()) {
28638
28683
  if (excluded.has(entry.name))
28639
28684
  continue;
28640
- walk(path22.join(dir, entry.name), depth + 1);
28685
+ walk(path23.join(dir, entry.name), depth + 1);
28641
28686
  } else if (entry.isFile() && (entry.name === "README.md" || entry.name.endsWith(".md"))) {
28642
- matches.push("./" + path22.relative(cwd, path22.join(dir, entry.name)).replaceAll("\\", "/"));
28687
+ matches.push("./" + path23.relative(cwd, path23.join(dir, entry.name)).replaceAll("\\", "/"));
28643
28688
  }
28644
28689
  }
28645
28690
  };
@@ -28647,7 +28692,7 @@ var documentationFiles = (cwd) => {
28647
28692
  return matches.toSorted().slice(0, 200);
28648
28693
  };
28649
28694
  var readTrimmed2 = (file, maxLines) => {
28650
- if (!existsSync8(file))
28695
+ if (!existsSync9(file))
28651
28696
  return "";
28652
28697
  const lines = readFileSync7(file, "utf8").split(`
28653
28698
  `);
@@ -28655,7 +28700,7 @@ var readTrimmed2 = (file, maxLines) => {
28655
28700
  `);
28656
28701
  };
28657
28702
  function prReadyContext(root, range) {
28658
- const cwd = path22.resolve(repoRoot(root));
28703
+ const cwd = path23.resolve(repoRoot(root));
28659
28704
  if (range !== undefined && !isResolvableContextRange(cwd, range))
28660
28705
  return invalidRange(cwd);
28661
28706
  let stdout = "";
@@ -28713,7 +28758,7 @@ ${status.stderr}` : "");
28713
28758
  stdout += `template_path: ${template}
28714
28759
 
28715
28760
  `;
28716
- stdout += readTrimmed2(path22.join(cwd, template), 220);
28761
+ stdout += readTrimmed2(path23.join(cwd, template), 220);
28717
28762
  } else {
28718
28763
  stdout += `template_path: none
28719
28764
 
@@ -28723,7 +28768,7 @@ ${status.stderr}` : "");
28723
28768
  stdout += `
28724
28769
  `;
28725
28770
  stdout += printSection("Recent Validation Signals");
28726
- if (existsSync8(path22.join(cwd, "package.json"))) {
28771
+ if (existsSync9(path23.join(cwd, "package.json"))) {
28727
28772
  stdout += `package.json detected. Common scripts:
28728
28773
  `;
28729
28774
  const found = packageScripts(cwd, ["lint", "format:check", "test", "build"]);
@@ -28732,7 +28777,7 @@ ${status.stderr}` : "");
28732
28777
  `) + `
28733
28778
  `;
28734
28779
  }
28735
- if (existsSync8(path22.join(cwd, "Cargo.toml")) || existsSync8(path22.join(cwd, "src-tauri/Cargo.toml"))) {
28780
+ if (existsSync9(path23.join(cwd, "Cargo.toml")) || existsSync9(path23.join(cwd, "src-tauri/Cargo.toml"))) {
28736
28781
  stdout += `Rust project detected.
28737
28782
  `;
28738
28783
  }
@@ -28765,7 +28810,7 @@ var CHANGELOG_RULES = `- Use an [Unreleased] section.
28765
28810
  - Apply with the host-native editor, preserving the repository changelog conventions.
28766
28811
  - If Unreleased already has duplicate category headings, normalize_only first.`;
28767
28812
  function changelogContext(root, range) {
28768
- const cwd = path22.resolve(repoRoot(root));
28813
+ const cwd = path23.resolve(repoRoot(root));
28769
28814
  if (range !== undefined && !isResolvableContextRange(cwd, range))
28770
28815
  return invalidRange(cwd);
28771
28816
  const resolvedRange = rangeArgOrDefault(range, cwd);
@@ -28783,8 +28828,8 @@ function changelogContext(root, range) {
28783
28828
  stdout += CHANGELOG_RULES + `
28784
28829
  `;
28785
28830
  stdout += printSection("Existing CHANGELOG.md");
28786
- const changelogPath = path22.join(cwd, "CHANGELOG.md");
28787
- if (existsSync8(changelogPath)) {
28831
+ const changelogPath = path23.join(cwd, "CHANGELOG.md");
28832
+ if (existsSync9(changelogPath)) {
28788
28833
  stdout += readTrimmed2(changelogPath, 260) + `
28789
28834
  `;
28790
28835
  } else {
@@ -28803,7 +28848,7 @@ function changelogContext(root, range) {
28803
28848
  return { stdout, stderr: "", exitCode: 0, cwd };
28804
28849
  }
28805
28850
  function docsRefreshContext(root, range) {
28806
- const cwd = path22.resolve(repoRoot(root));
28851
+ const cwd = path23.resolve(repoRoot(root));
28807
28852
  if (range !== undefined && !isResolvableContextRange(cwd, range))
28808
28853
  return invalidRange(cwd);
28809
28854
  const resolvedRange = rangeArgOrDefault(range, cwd);
@@ -28825,8 +28870,8 @@ function docsRefreshContext(root, range) {
28825
28870
  `) + `
28826
28871
  `;
28827
28872
  stdout += printSection("README Preview");
28828
- const readme = path22.join(cwd, "README.md");
28829
- if (existsSync8(readme)) {
28873
+ const readme = path23.join(cwd, "README.md");
28874
+ if (existsSync9(readme)) {
28830
28875
  stdout += readTrimmed2(readme, 220) + `
28831
28876
  `;
28832
28877
  } else {
@@ -28834,8 +28879,8 @@ function docsRefreshContext(root, range) {
28834
28879
  `;
28835
28880
  }
28836
28881
  stdout += printSection("Package Scripts");
28837
- const pkgPath = path22.join(cwd, "package.json");
28838
- if (existsSync8(pkgPath)) {
28882
+ const pkgPath = path23.join(cwd, "package.json");
28883
+ if (existsSync9(pkgPath)) {
28839
28884
  try {
28840
28885
  const pkg = JSON.parse(readFileSync7(pkgPath, "utf8"));
28841
28886
  stdout += JSON.stringify({ name: pkg.name, version: pkg.version, scripts: pkg.scripts }, null, 2) + `
@@ -28848,7 +28893,7 @@ function docsRefreshContext(root, range) {
28848
28893
  return { stdout, stderr: "", exitCode: 0, cwd };
28849
28894
  }
28850
28895
  function releaseNotesContext(root, rangeOrTag) {
28851
- const cwd = path22.resolve(repoRoot(root));
28896
+ const cwd = path23.resolve(repoRoot(root));
28852
28897
  if (!rangeOrTag) {
28853
28898
  return {
28854
28899
  stdout: "",
@@ -28891,7 +28936,7 @@ function releaseNotesContext(root, rangeOrTag) {
28891
28936
  `;
28892
28937
  stdout += printSection("Existing Release Files");
28893
28938
  for (const rel of ["CHANGELOG.md", "RELEASE_NOTES.md", ".github/releases.md"]) {
28894
- if (existsSync8(path22.join(cwd, rel)))
28939
+ if (existsSync9(path23.join(cwd, rel)))
28895
28940
  stdout += rel + `
28896
28941
  `;
28897
28942
  }
@@ -28923,7 +28968,7 @@ import { spawnSync as spawnSync17 } from "node:child_process";
28923
28968
 
28924
28969
  // packages/workit-core/src/core/pr-create.ts
28925
28970
  import fs16 from "node:fs";
28926
- import path23 from "node:path";
28971
+ import path24 from "node:path";
28927
28972
  import { spawnSync as spawnSync16 } from "node:child_process";
28928
28973
  // packages/workit-core/src/forge/pr-body.ts
28929
28974
  function parseGhIssue(value) {
@@ -28943,11 +28988,11 @@ var LOCAL = bounded(20000);
28943
28988
  var NETWORK = bounded(60000);
28944
28989
  function whichOnPath(tool) {
28945
28990
  const names = process.platform === "win32" ? [tool, `${tool}.exe`, `${tool}.cmd`] : [tool];
28946
- for (const dir of (process.env.PATH ?? "").split(path23.delimiter)) {
28991
+ for (const dir of (process.env.PATH ?? "").split(path24.delimiter)) {
28947
28992
  if (!dir)
28948
28993
  continue;
28949
28994
  for (const name of names) {
28950
- const candidate = path23.join(dir, name);
28995
+ const candidate = path24.join(dir, name);
28951
28996
  try {
28952
28997
  fs16.accessSync(candidate, fs16.constants.X_OK);
28953
28998
  return candidate;
@@ -29068,7 +29113,7 @@ var fetchGitLabIssueBody = async (ref, root, deps = {}) => {
29068
29113
 
29069
29114
  // packages/workit-core/src/core/youtrack.ts
29070
29115
  import fs18 from "node:fs";
29071
- import path25 from "node:path";
29116
+ import path26 from "node:path";
29072
29117
 
29073
29118
  // packages/workit-core/src/core/templates.ts
29074
29119
  var repoRoot2 = assetRoot();
@@ -29083,7 +29128,7 @@ import { spawnSync as spawnSync18 } from "node:child_process";
29083
29128
 
29084
29129
  // packages/workit-core/src/forge/exec.ts
29085
29130
  import fs17 from "node:fs";
29086
- import path24 from "node:path";
29131
+ import path25 from "node:path";
29087
29132
 
29088
29133
  // packages/workit-core/src/forge/redact.ts
29089
29134
  var KEY = String.raw`[A-Za-z0-9_.-]*?(?:token|secret|password|passwd|pwd|api[_-]?key|access[_-]?key|account[_-]?key|private[_-]?key|client[_-]?secret|credentials?|authorization|cookie|signature)[A-Za-z0-9_.-]*`;
@@ -29094,11 +29139,11 @@ var ANSI = new RegExp(String.raw`\u001b\[[0-9;?]*[ -/]*[@-~]|\u001b\][^\u0007]*\
29094
29139
  // packages/workit-core/src/forge/exec.ts
29095
29140
  var MAX_BUFFER2 = 64 * 1024 * 1024;
29096
29141
  function findExecutable(bin, env) {
29097
- const dirs = (env.PATH ?? env.Path ?? "").split(path24.delimiter).filter(Boolean);
29142
+ const dirs = (env.PATH ?? env.Path ?? "").split(path25.delimiter).filter(Boolean);
29098
29143
  const exts = process.platform === "win32" ? [".exe"] : [""];
29099
29144
  for (const dir of dirs)
29100
29145
  for (const ext of exts) {
29101
- const candidate = path24.join(dir, `${bin}${ext}`);
29146
+ const candidate = path25.join(dir, `${bin}${ext}`);
29102
29147
  try {
29103
29148
  const stat = fs17.statSync(candidate);
29104
29149
  if (stat.isFile())
@@ -29141,7 +29186,7 @@ var YTRACK_MISSING = "ytrack is not on PATH: Workit reaches YouTrack only throug
29141
29186
 
29142
29187
  // packages/workit-core/src/core/youtrack.ts
29143
29188
  var ISSUE_RE = /^[A-Z]+-\d+$/;
29144
- var youTrackReadOnlyConfigPath = () => process.env.WORKIT_YOUTRACK_CONFIG ?? path25.join(resolveConfigDir(), "youtrack.json");
29189
+ var youTrackReadOnlyConfigPath = () => process.env.WORKIT_YOUTRACK_CONFIG ?? path26.join(resolveConfigDir(), "youtrack.json");
29145
29190
  var readYouTrackContextConfig = () => {
29146
29191
  const cfgPath = youTrackReadOnlyConfigPath();
29147
29192
  if (!fs18.existsSync(cfgPath))
@@ -29493,22 +29538,22 @@ function resolveGitRevision(root, value) {
29493
29538
  }
29494
29539
  }
29495
29540
  function resolveInside(root, candidate) {
29496
- const base = realpathSync7(root);
29497
- const target = path26.resolve(base, candidate);
29498
- if (target !== base && !target.startsWith(base + path26.sep)) {
29541
+ const base = realpathSync8(root);
29542
+ const target = path27.resolve(base, candidate);
29543
+ if (target !== base && !target.startsWith(base + path27.sep)) {
29499
29544
  throw new Error("path must stay inside repository root");
29500
29545
  }
29501
29546
  let ancestor = target;
29502
- while (!existsSync9(ancestor))
29503
- ancestor = path26.dirname(ancestor);
29504
- const canonicalAncestor = realpathSync7(ancestor);
29505
- if (canonicalAncestor !== base && !canonicalAncestor.startsWith(base + path26.sep)) {
29547
+ while (!existsSync10(ancestor))
29548
+ ancestor = path27.dirname(ancestor);
29549
+ const canonicalAncestor = realpathSync8(ancestor);
29550
+ if (canonicalAncestor !== base && !canonicalAncestor.startsWith(base + path27.sep)) {
29506
29551
  throw new Error("path must stay inside repository root");
29507
29552
  }
29508
29553
  return target;
29509
29554
  }
29510
29555
  function run2(root, executable, args, env = {}) {
29511
- const cwd = realpathSync7(root);
29556
+ const cwd = realpathSync8(root);
29512
29557
  const result = spawnSync19(executable, args, {
29513
29558
  cwd,
29514
29559
  encoding: "utf8",
@@ -29609,13 +29654,13 @@ var rootVariants = (workspaceRoot) => {
29609
29654
  if (!workspaceRoot)
29610
29655
  return [];
29611
29656
  const roots = new Set;
29612
- for (const candidate of [workspaceRoot, path27.resolve(workspaceRoot)]) {
29613
- if (path27.isAbsolute(candidate) && candidate !== path27.parse(candidate).root)
29657
+ for (const candidate of [workspaceRoot, path28.resolve(workspaceRoot)]) {
29658
+ if (path28.isAbsolute(candidate) && candidate !== path28.parse(candidate).root)
29614
29659
  roots.add(candidate);
29615
29660
  }
29616
29661
  try {
29617
- const canonical = realpathSync8(workspaceRoot);
29618
- if (canonical !== path27.parse(canonical).root)
29662
+ const canonical = realpathSync9(workspaceRoot);
29663
+ if (canonical !== path28.parse(canonical).root)
29619
29664
  roots.add(canonical);
29620
29665
  } catch {}
29621
29666
  return [...roots].toSorted((left, right) => right.length - left.length);
@@ -29697,12 +29742,12 @@ var thrownResult = (tool, error, workspaceRoot) => {
29697
29742
  };
29698
29743
  function createMcpServer(host, contextProvider) {
29699
29744
  assertMcpHost(host);
29700
- const here = path27.dirname(fileURLToPath2(import.meta.url));
29745
+ const here = path28.dirname(fileURLToPath2(import.meta.url));
29701
29746
  const sourceMarker = markSourcesLoaded([
29702
- path27.join(here, "server.ts"),
29703
- path27.join(here, "..", "..", "workit-core", "src", "core", "task-contract.ts"),
29704
- path27.join(here, "..", "..", "workit-core", "src", "core", "task-engine.ts")
29705
- ].filter((file) => existsSync10(file)));
29747
+ path28.join(here, "server.ts"),
29748
+ path28.join(here, "..", "..", "workit-core", "src", "core", "task-contract.ts"),
29749
+ path28.join(here, "..", "..", "workit-core", "src", "core", "task-engine.ts")
29750
+ ].filter((file) => existsSync11(file)));
29706
29751
  let staleWarned = false;
29707
29752
  const failures = new Map;
29708
29753
  const server = new Server({ name: "workit", version: VERSION }, { capabilities: { tools: {}, resources: {} } });
@@ -29884,8 +29929,8 @@ var main = async () => {
29884
29929
  process.exitCode = 2;
29885
29930
  }
29886
29931
  };
29887
- var entryPath = process.argv[1] ? path28.resolve(process.argv[1]) : "";
29888
- if (entryPath === path28.resolve(fileURLToPath3(import.meta.url)))
29932
+ var entryPath = process.argv[1] ? path29.resolve(process.argv[1]) : "";
29933
+ if (entryPath === path29.resolve(fileURLToPath3(import.meta.url)))
29889
29934
  await main();
29890
29935
  export {
29891
29936
  McpCapabilityUnavailableError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "1.4.2",
3
+ "version": "1.5.0",
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.4.2",
47
+ "@workit-dev/core": "^1.5.0",
48
48
  "zod": "4.6.5"
49
49
  },
50
50
  "engines": {