@workit-dev/codex 2.4.1 → 2.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workit",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -6621,13 +6621,13 @@ var require_dist = __commonJS(function(exports, module) {
6621
6621
  });
6622
6622
 
6623
6623
  // packages/workit-codex/scripts/launch-mcp.ts
6624
- import { existsSync as existsSync16, realpathSync as realpathSync11, statSync as statSync6 } from "node:fs";
6624
+ import { existsSync as existsSync17, realpathSync as realpathSync12, statSync as statSync6 } from "node:fs";
6625
6625
  import path38 from "node:path";
6626
6626
  import { fileURLToPath as fileURLToPath3 } from "node:url";
6627
6627
 
6628
6628
  // packages/workit-core/src/core.ts
6629
6629
  import { spawnSync as spawnSync20 } from "node:child_process";
6630
- import { existsSync as existsSync11, realpathSync as realpathSync8 } from "node:fs";
6630
+ import { existsSync as existsSync12, realpathSync as realpathSync9 } from "node:fs";
6631
6631
  import path31 from "node:path";
6632
6632
 
6633
6633
  // packages/workit-core/src/core/task-contract.ts
@@ -14327,11 +14327,11 @@ var gitContext = (workspaceRoot, paths = []) => {
14327
14327
  // packages/workit-core/src/core/workspaces.ts
14328
14328
  import { spawnSync as spawnSync6 } from "node:child_process";
14329
14329
  import { createHash as createHash3 } from "node:crypto";
14330
- import { existsSync as existsSync2, lstatSync as lstatSync2, readFileSync as readFileSync4, realpathSync as realpathSync2 } from "node:fs";
14330
+ import { existsSync as existsSync3, lstatSync as lstatSync2, readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
14331
14331
  import path7 from "node:path";
14332
14332
 
14333
14333
  // packages/workit-core/src/core/remotes.ts
14334
- import { lstatSync, readFileSync as readFileSync3, realpathSync, statSync } from "node:fs";
14334
+ import { lstatSync, readFileSync as readFileSync3, realpathSync as realpathSync2, statSync } from "node:fs";
14335
14335
  import { spawnSync as spawnSync5 } from "node:child_process";
14336
14336
  import path6 from "node:path";
14337
14337
 
@@ -15157,7 +15157,7 @@ function resolveSshHost(alias, sshConfig) {
15157
15157
 
15158
15158
  // packages/workit-core/src/core/account-home.ts
15159
15159
  import { spawnSync as spawnSync4 } from "node:child_process";
15160
- import { readFileSync as readFileSync2 } from "node:fs";
15160
+ import { existsSync as existsSync2, readFileSync as readFileSync2, readlinkSync, realpathSync } from "node:fs";
15161
15161
  import os3 from "node:os";
15162
15162
  var WINDOWS = "C:\\Windows";
15163
15163
  var SYSTEM32 = `${WINDOWS}\\System32\\`;
@@ -15258,7 +15258,7 @@ var isRepoDir = (dir) => ["HEAD", "objects", "refs"].every((name) => {
15258
15258
  var gitDirAt = (at, depth = 0) => {
15259
15259
  let real;
15260
15260
  try {
15261
- real = realpathSync.native(at);
15261
+ real = realpathSync2.native(at);
15262
15262
  } catch {
15263
15263
  return null;
15264
15264
  }
@@ -15290,7 +15290,7 @@ var gitDirAt = (at, depth = 0) => {
15290
15290
  } catch {
15291
15291
  continue;
15292
15292
  }
15293
- const resolved = realpathSync.native(item);
15293
+ const resolved = realpathSync2.native(item);
15294
15294
  const rel = path6.relative(real, resolved);
15295
15295
  if (rel && !rel.startsWith("..") && !path6.isAbsolute(rel))
15296
15296
  continue;
@@ -15717,8 +15717,8 @@ var probeCheckout = (cwd) => {
15717
15717
  if (cached !== undefined)
15718
15718
  return cached;
15719
15719
  let dir = path7.resolve(cwd);
15720
- while (!existsSync2(path7.join(dir, ".git"))) {
15721
- if (["HEAD", "objects", "refs"].every((name) => existsSync2(path7.join(dir, name)))) {
15720
+ while (!existsSync3(path7.join(dir, ".git"))) {
15721
+ if (["HEAD", "objects", "refs"].every((name) => existsSync3(path7.join(dir, name)))) {
15722
15722
  const real = realpathOf(dir);
15723
15723
  const owner = ownInternals(real) === true ? gitDirOwner(real) : null;
15724
15724
  if (owner === null)
@@ -15802,7 +15802,7 @@ var ownInternals = (real) => {
15802
15802
  }
15803
15803
  let resolved;
15804
15804
  try {
15805
- resolved = (realpathSync2.native ?? realpathSync2)(at);
15805
+ resolved = (realpathSync3.native ?? realpathSync3)(at);
15806
15806
  } catch {
15807
15807
  return false;
15808
15808
  }
@@ -15860,7 +15860,7 @@ var matchingEntries = (cwd, entries) => {
15860
15860
  return main ? match(main) : direct;
15861
15861
  };
15862
15862
  var realpathOf = (p) => {
15863
- const real = realpathSync2.native ?? realpathSync2;
15863
+ const real = realpathSync3.native ?? realpathSync3;
15864
15864
  try {
15865
15865
  return real(p);
15866
15866
  } catch {
@@ -18245,14 +18245,14 @@ function acquireFileLockSync(targetPath, options) {
18245
18245
  }
18246
18246
  }
18247
18247
  // packages/workit-core/src/core/package-root.ts
18248
- import { existsSync as existsSync3 } from "node:fs";
18248
+ import { existsSync as existsSync4 } from "node:fs";
18249
18249
  import path14 from "node:path";
18250
18250
  import { fileURLToPath } from "node:url";
18251
18251
  var packageRoot = () => {
18252
18252
  let dir = path14.dirname(fileURLToPath(import.meta.url));
18253
18253
  while (true) {
18254
18254
  const parent = path14.dirname(dir);
18255
- if (existsSync3(path14.join(dir, "package.json")) || parent === dir)
18255
+ if (existsSync4(path14.join(dir, "package.json")) || parent === dir)
18256
18256
  return dir;
18257
18257
  dir = parent;
18258
18258
  }
@@ -18260,7 +18260,7 @@ var packageRoot = () => {
18260
18260
  var assetRoot = () => {
18261
18261
  const root = packageRoot();
18262
18262
  const assets = path14.join(root, "assets");
18263
- return existsSync3(assets) ? assets : root;
18263
+ return existsSync4(assets) ? assets : root;
18264
18264
  };
18265
18265
 
18266
18266
  // packages/workit-core/src/core/store-lock.ts
@@ -20657,7 +20657,7 @@ var PM_RUN = new Set(["run", "run-script"]);
20657
20657
  var PYTHON_RUNNERS = new Set(["uv", "poetry", "pipenv", "pdm", "hatch", "rye"]);
20658
20658
 
20659
20659
  // packages/workit-core/src/core/policy/derive.ts
20660
- import { existsSync as existsSync7 } from "node:fs";
20660
+ import { existsSync as existsSync8 } from "node:fs";
20661
20661
  import path21 from "node:path";
20662
20662
 
20663
20663
  // packages/workit-core/src/ledger.ts
@@ -20744,7 +20744,7 @@ function bookkeepingPaths(cwd, input) {
20744
20744
  }
20745
20745
 
20746
20746
  // packages/workit-core/src/core/policy/lane.ts
20747
- import { existsSync as existsSync6, readFileSync as readFileSync7 } from "node:fs";
20747
+ import { existsSync as existsSync7, readFileSync as readFileSync7 } from "node:fs";
20748
20748
  import path18 from "node:path";
20749
20749
 
20750
20750
  // packages/workit-core/src/git/default-base.ts
@@ -22814,7 +22814,7 @@ var productDecision = (task, ledger) => {
22814
22814
  };
22815
22815
  };
22816
22816
  var planRecorded = (task, root) => {
22817
- const cited = (latestJudgment(task)?.refs ?? []).find((ref) => ref.kind === "external" || ref.kind === "file" && existsSync7(path21.resolve(root, ref.path)));
22817
+ const cited = (latestJudgment(task)?.refs ?? []).find((ref) => ref.kind === "external" || ref.kind === "file" && existsSync8(path21.resolve(root, ref.path)));
22818
22818
  if (cited)
22819
22819
  return {
22820
22820
  met: true,
@@ -24034,7 +24034,7 @@ var exportDigest = (bundle) => sha256({
24034
24034
  import path26 from "node:path";
24035
24035
 
24036
24036
  // packages/workit-core/src/core/eval-world.ts
24037
- import { existsSync as existsSync9, realpathSync as realpathSync5 } from "node:fs";
24037
+ import { existsSync as existsSync10, realpathSync as realpathSync6 } from "node:fs";
24038
24038
  import os5 from "node:os";
24039
24039
  import path24 from "node:path";
24040
24040
  var EVAL_WORLD_ENV = "WORKIT_EVAL_WORLD";
@@ -24048,8 +24048,8 @@ var evalWorld = (cwd) => {
24048
24048
  if (!raw || !path24.isAbsolute(raw))
24049
24049
  return null;
24050
24050
  try {
24051
- const world = realpathSync5(raw);
24052
- return inside2(realpathSync5(os5.tmpdir()), world) && inside2(world, realpathSync5(cwd)) && existsSync9(path24.join(world, EVAL_WORLD_MARKER)) ? world : null;
24051
+ const world = realpathSync6(raw);
24052
+ return inside2(realpathSync6(os5.tmpdir()), world) && inside2(world, realpathSync6(cwd)) && existsSync10(path24.join(world, EVAL_WORLD_MARKER)) ? world : null;
24053
24053
  } catch {
24054
24054
  return null;
24055
24055
  }
@@ -24579,7 +24579,7 @@ var BRANCH_RENAME = new Set(["-m", "-M", "--move", "-c", "-C", "--copy"]);
24579
24579
  var WORKTREE_VALUES = new Set(["--reason"]);
24580
24580
  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"]));
24581
24581
  // packages/workit-core/src/core/task-engine.ts
24582
- import { realpathSync as realpathSync7 } from "node:fs";
24582
+ import { realpathSync as realpathSync8 } from "node:fs";
24583
24583
 
24584
24584
  // packages/workit-core/src/core/policy-resolver.ts
24585
24585
  function resolvePolicy(input) {
@@ -24828,12 +24828,12 @@ var judgeInputSummary = (raw) => {
24828
24828
  };
24829
24829
 
24830
24830
  // packages/workit-core/src/core/task-view.ts
24831
- import { realpathSync as realpathSync6 } from "node:fs";
24831
+ import { realpathSync as realpathSync7 } from "node:fs";
24832
24832
  var environment = () => [];
24833
24833
  var sameSession2 = (value, context) => typeof value === "object" && value !== null && value.kind === "host" && value.host === context.caller.host && value.handle === context.caller.actor;
24834
24834
  function contextRootError(store, context) {
24835
24835
  try {
24836
- realpathSync6(context.root);
24836
+ realpathSync7(context.root);
24837
24837
  const root = checkoutRootOf(context.root);
24838
24838
  if (root !== store.root && !sameDirectoryIdentity(root, store.root))
24839
24839
  return failure2("invalid_input", "operation context root does not match the task store root");
@@ -26303,7 +26303,7 @@ class WorkitCore {
26303
26303
  if (view.task.workspaceId !== view.workspace.id)
26304
26304
  return failure2("invalid_input", "task and workspace bindings are invalid");
26305
26305
  try {
26306
- if (realpathSync7(view.workspace.root) !== this.store.root)
26306
+ if (realpathSync8(view.workspace.root) !== this.store.root)
26307
26307
  return failure2("invalid_input", "task view root does not match the task store");
26308
26308
  } catch {
26309
26309
  return failure2("invalid_input", "task view root cannot be resolved");
@@ -26554,7 +26554,7 @@ class WorkitCore {
26554
26554
  }
26555
26555
  // packages/workit-core/src/core/repo-context.ts
26556
26556
  import { spawnSync as spawnSync16 } from "node:child_process";
26557
- import { existsSync as existsSync10, readFileSync as readFileSync11, readdirSync as readdirSync4 } from "node:fs";
26557
+ import { existsSync as existsSync11, readFileSync as readFileSync11, readdirSync as readdirSync4 } from "node:fs";
26558
26558
  import path27 from "node:path";
26559
26559
  var isSafeContextRange = (value) => value.length <= 4096 && (() => {
26560
26560
  try {
@@ -26736,7 +26736,7 @@ var diffStatForRange = (cwd, range) => {
26736
26736
  };
26737
26737
  var packageScripts = (cwd, keys) => {
26738
26738
  const pkgPath = path27.join(cwd, "package.json");
26739
- if (!existsSync10(pkgPath))
26739
+ if (!existsSync11(pkgPath))
26740
26740
  return [];
26741
26741
  try {
26742
26742
  const pkg = JSON.parse(readFileSync11(pkgPath, "utf8"));
@@ -26771,7 +26771,7 @@ var documentationFiles = (cwd) => {
26771
26771
  return matches.toSorted().slice(0, 200);
26772
26772
  };
26773
26773
  var readTrimmed2 = (file, maxLines) => {
26774
- if (!existsSync10(file))
26774
+ if (!existsSync11(file))
26775
26775
  return "";
26776
26776
  const lines = readFileSync11(file, "utf8").split(`
26777
26777
  `);
@@ -26847,7 +26847,7 @@ ${status.stderr}` : "");
26847
26847
  stdout += `
26848
26848
  `;
26849
26849
  stdout += printSection("Recent Validation Signals");
26850
- if (existsSync10(path27.join(cwd, "package.json"))) {
26850
+ if (existsSync11(path27.join(cwd, "package.json"))) {
26851
26851
  stdout += `package.json detected. Common scripts:
26852
26852
  `;
26853
26853
  const found = packageScripts(cwd, ["lint", "format:check", "test", "build"]);
@@ -26856,7 +26856,7 @@ ${status.stderr}` : "");
26856
26856
  `) + `
26857
26857
  `;
26858
26858
  }
26859
- if (existsSync10(path27.join(cwd, "Cargo.toml")) || existsSync10(path27.join(cwd, "src-tauri/Cargo.toml"))) {
26859
+ if (existsSync11(path27.join(cwd, "Cargo.toml")) || existsSync11(path27.join(cwd, "src-tauri/Cargo.toml"))) {
26860
26860
  stdout += `Rust project detected.
26861
26861
  `;
26862
26862
  }
@@ -26908,7 +26908,7 @@ function changelogContext(root, range) {
26908
26908
  `;
26909
26909
  stdout += printSection("Existing CHANGELOG.md");
26910
26910
  const changelogPath = path27.join(cwd, "CHANGELOG.md");
26911
- if (existsSync10(changelogPath)) {
26911
+ if (existsSync11(changelogPath)) {
26912
26912
  stdout += readTrimmed2(changelogPath, 260) + `
26913
26913
  `;
26914
26914
  } else {
@@ -26950,7 +26950,7 @@ function docsRefreshContext(root, range) {
26950
26950
  `;
26951
26951
  stdout += printSection("README Preview");
26952
26952
  const readme = path27.join(cwd, "README.md");
26953
- if (existsSync10(readme)) {
26953
+ if (existsSync11(readme)) {
26954
26954
  stdout += readTrimmed2(readme, 220) + `
26955
26955
  `;
26956
26956
  } else {
@@ -26959,7 +26959,7 @@ function docsRefreshContext(root, range) {
26959
26959
  }
26960
26960
  stdout += printSection("Package Scripts");
26961
26961
  const pkgPath = path27.join(cwd, "package.json");
26962
- if (existsSync10(pkgPath)) {
26962
+ if (existsSync11(pkgPath)) {
26963
26963
  try {
26964
26964
  const pkg = JSON.parse(readFileSync11(pkgPath, "utf8"));
26965
26965
  stdout += JSON.stringify({ name: pkg.name, version: pkg.version, scripts: pkg.scripts }, null, 2) + `
@@ -27015,7 +27015,7 @@ function releaseNotesContext(root, rangeOrTag) {
27015
27015
  `;
27016
27016
  stdout += printSection("Existing Release Files");
27017
27017
  for (const rel of ["CHANGELOG.md", "RELEASE_NOTES.md", ".github/releases.md"]) {
27018
- if (existsSync10(path27.join(cwd, rel)))
27018
+ if (existsSync11(path27.join(cwd, rel)))
27019
27019
  stdout += rel + `
27020
27020
  `;
27021
27021
  }
@@ -27617,22 +27617,22 @@ function resolveGitRevision(root, value) {
27617
27617
  }
27618
27618
  }
27619
27619
  function resolveInside(root, candidate) {
27620
- const base = realpathSync8(root);
27620
+ const base = realpathSync9(root);
27621
27621
  const target = path31.resolve(base, candidate);
27622
27622
  if (target !== base && !target.startsWith(base + path31.sep)) {
27623
27623
  throw new Error("path must stay inside repository root");
27624
27624
  }
27625
27625
  let ancestor = target;
27626
- while (!existsSync11(ancestor))
27626
+ while (!existsSync12(ancestor))
27627
27627
  ancestor = path31.dirname(ancestor);
27628
- const canonicalAncestor = realpathSync8(ancestor);
27628
+ const canonicalAncestor = realpathSync9(ancestor);
27629
27629
  if (canonicalAncestor !== base && !canonicalAncestor.startsWith(base + path31.sep)) {
27630
27630
  throw new Error("path must stay inside repository root");
27631
27631
  }
27632
27632
  return target;
27633
27633
  }
27634
27634
  function run2(root, executable, args, env = {}) {
27635
- const cwd = realpathSync8(root);
27635
+ const cwd = realpathSync9(root);
27636
27636
  const result = spawnSync20(executable, args, {
27637
27637
  cwd,
27638
27638
  encoding: "utf8",
@@ -27647,7 +27647,7 @@ function run2(root, executable, args, env = {}) {
27647
27647
  }
27648
27648
 
27649
27649
  // packages/workit-core/src/core/cli-locate.ts
27650
- import { closeSync as closeSync2, existsSync as existsSync12, openSync as openSync2, readSync } from "node:fs";
27650
+ import { closeSync as closeSync2, existsSync as existsSync13, openSync as openSync2, readSync } from "node:fs";
27651
27651
  import path32 from "node:path";
27652
27652
  var LAUNCHER_MARKER = "workit-owned-launcher";
27653
27653
  var CLI_PACKAGE_PATH = ["node_modules", "@workit-dev", "cli"];
@@ -27676,7 +27676,7 @@ var head = (file) => {
27676
27676
  var locateWorkitCli = (options = {}) => {
27677
27677
  const env = options.env ?? process.env;
27678
27678
  const platform = options.platform ?? process.platform;
27679
- const exists = options.exists ?? existsSync12;
27679
+ const exists = options.exists ?? existsSync13;
27680
27680
  const read = options.read ?? head;
27681
27681
  const node = options.node ?? process.execPath;
27682
27682
  const launcher = ownedLauncherPath(env, platform);
@@ -27738,7 +27738,7 @@ var SUPPORT_MATRIX = {
27738
27738
  };
27739
27739
 
27740
27740
  // packages/workit-mcp/src/server.ts
27741
- import { existsSync as existsSync13, readFileSync as readFileSync12, realpathSync as realpathSync9 } from "node:fs";
27741
+ import { existsSync as existsSync14, readFileSync as readFileSync12, realpathSync as realpathSync10 } from "node:fs";
27742
27742
  import path33 from "node:path";
27743
27743
  // node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
27744
27744
  function isZ4Schema(s) {
@@ -30209,7 +30209,7 @@ var rootVariants = (workspaceRoot) => {
30209
30209
  roots.add(candidate);
30210
30210
  }
30211
30211
  try {
30212
- const canonical = realpathSync9(workspaceRoot);
30212
+ const canonical = realpathSync10(workspaceRoot);
30213
30213
  if (canonical !== path33.parse(canonical).root)
30214
30214
  roots.add(canonical);
30215
30215
  } catch {}
@@ -30297,7 +30297,7 @@ function createMcpServer(host, contextProvider) {
30297
30297
  path33.join(here, "server.ts"),
30298
30298
  path33.join(here, "..", "..", "workit-core", "src", "core", "task-contract.ts"),
30299
30299
  path33.join(here, "..", "..", "workit-core", "src", "core", "task-engine.ts")
30300
- ].filter((file) => existsSync13(file)));
30300
+ ].filter((file) => existsSync14(file)));
30301
30301
  let staleWarned = false;
30302
30302
  const failures = new Map;
30303
30303
  const server = new Server({ name: "workit", version: VERSION }, { capabilities: { tools: {}, resources: {} } });
@@ -30783,16 +30783,16 @@ var PROMPT_INTENTS = [
30783
30783
  ].map(([name, pattern]) => [`workit-${name}`, pattern]);
30784
30784
  var READERS = new Set("cat sed head tail less more bat nl get-content gc type".split(" "));
30785
30785
  // packages/workit-core/src/hooks/hosts/fields.ts
30786
- import { existsSync as existsSync14, realpathSync as realpathSync10, statSync as statSync5 } from "node:fs";
30786
+ import { existsSync as existsSync15, realpathSync as realpathSync11, statSync as statSync5 } from "node:fs";
30787
30787
  import path35 from "node:path";
30788
30788
  var isRecord4 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
30789
30789
  var nonEmpty2 = (value) => typeof value === "string" && value.trim() !== "";
30790
30790
  var optionalText = (value) => typeof value === "string" ? value : null;
30791
30791
  var existingDirectory = (value) => {
30792
- if (!nonEmpty2(value) || !path35.isAbsolute(value) || !existsSync14(value))
30792
+ if (!nonEmpty2(value) || !path35.isAbsolute(value) || !existsSync15(value))
30793
30793
  return null;
30794
30794
  try {
30795
- return statSync5(value).isDirectory() ? realpathSync10(value) : null;
30795
+ return statSync5(value).isDirectory() ? realpathSync11(value) : null;
30796
30796
  } catch {
30797
30797
  return null;
30798
30798
  }
@@ -31691,7 +31691,7 @@ if (false)
31691
31691
 
31692
31692
  // packages/workit-codex/scripts/agents.ts
31693
31693
  import {
31694
- existsSync as existsSync15,
31694
+ existsSync as existsSync16,
31695
31695
  lstatSync as lstatSync6,
31696
31696
  mkdirSync as mkdirSync5,
31697
31697
  readdirSync as readdirSync5,
@@ -31750,7 +31750,7 @@ var lstatOrNull = (file) => {
31750
31750
  };
31751
31751
  var installCodexAgents = (pluginRoot, codexHome, models = {}) => {
31752
31752
  const source = path37.join(pluginRoot, "agents");
31753
- if (!existsSync15(source))
31753
+ if (!existsSync16(source))
31754
31754
  return [];
31755
31755
  const version = pluginVersion(pluginRoot);
31756
31756
  const target = path37.join(codexHome, "agents");
@@ -31816,13 +31816,13 @@ var resolveCodexWorkspaceRoot = (pluginRoot, env) => {
31816
31816
  const explicit = env.WORKIT_WORKSPACE_ROOT;
31817
31817
  const inherited = env.PWD;
31818
31818
  const candidate = explicit ?? (inherited && path38.resolve(inherited) !== path38.resolve(pluginRoot) ? inherited : undefined);
31819
- if (!candidate || !path38.isAbsolute(candidate) || !existsSync16(candidate))
31819
+ if (!candidate || !path38.isAbsolute(candidate) || !existsSync17(candidate))
31820
31820
  return null;
31821
31821
  try {
31822
31822
  if (!statSync6(candidate).isDirectory())
31823
31823
  return null;
31824
- const canonical = realpathSync11(candidate);
31825
- if (canonical === realpathSync11(pluginRoot)) {
31824
+ const canonical = realpathSync12(candidate);
31825
+ if (canonical === realpathSync12(pluginRoot)) {
31826
31826
  if (!explicit)
31827
31827
  return null;
31828
31828
  const workspace = new TaskStore(canonical).readWorkspace();
@@ -280,7 +280,7 @@ var releaseTagPrefixOf = (workspaceRoot, policyPrefix) => {
280
280
  // packages/workit-core/src/core/workspaces.ts
281
281
  import { spawnSync as spawnSync5 } from "node:child_process";
282
282
  import { createHash as createHash2 } from "node:crypto";
283
- import { existsSync as existsSync2, lstatSync as lstatSync2, readFileSync as readFileSync4, realpathSync as realpathSync2 } from "node:fs";
283
+ import { existsSync as existsSync3, lstatSync as lstatSync2, readFileSync as readFileSync4, realpathSync as realpathSync3 } from "node:fs";
284
284
  import path5 from "node:path";
285
285
 
286
286
  // node_modules/zod/v4/core/util.js
@@ -6157,7 +6157,7 @@ function superRefine(fn, params) {
6157
6157
  return _superRefine(fn, params);
6158
6158
  }
6159
6159
  // packages/workit-core/src/core/remotes.ts
6160
- import { lstatSync, readFileSync as readFileSync3, realpathSync, statSync } from "node:fs";
6160
+ import { lstatSync, readFileSync as readFileSync3, realpathSync as realpathSync2, statSync } from "node:fs";
6161
6161
  import { spawnSync as spawnSync4 } from "node:child_process";
6162
6162
  import path4 from "node:path";
6163
6163
 
@@ -6900,7 +6900,7 @@ function resolveSshHost(alias, sshConfig) {
6900
6900
 
6901
6901
  // packages/workit-core/src/core/account-home.ts
6902
6902
  import { spawnSync as spawnSync3 } from "node:child_process";
6903
- import { readFileSync as readFileSync2 } from "node:fs";
6903
+ import { existsSync as existsSync2, readFileSync as readFileSync2, readlinkSync, realpathSync } from "node:fs";
6904
6904
  import os2 from "node:os";
6905
6905
  var WINDOWS = "C:\\Windows";
6906
6906
  var SYSTEM32 = `${WINDOWS}\\System32\\`;
@@ -7001,7 +7001,7 @@ var isRepoDir = (dir) => ["HEAD", "objects", "refs"].every((name) => {
7001
7001
  var gitDirAt = (at, depth = 0) => {
7002
7002
  let real;
7003
7003
  try {
7004
- real = realpathSync.native(at);
7004
+ real = realpathSync2.native(at);
7005
7005
  } catch {
7006
7006
  return null;
7007
7007
  }
@@ -7033,7 +7033,7 @@ var gitDirAt = (at, depth = 0) => {
7033
7033
  } catch {
7034
7034
  continue;
7035
7035
  }
7036
- const resolved = realpathSync.native(item);
7036
+ const resolved = realpathSync2.native(item);
7037
7037
  const rel = path4.relative(real, resolved);
7038
7038
  if (rel && !rel.startsWith("..") && !path4.isAbsolute(rel))
7039
7039
  continue;
@@ -7160,7 +7160,7 @@ var TRANSPORT_ENV = ["GIT_SSH", "GIT_SSH_COMMAND", "GIT_PROXY_COMMAND"];
7160
7160
  var userGitSeam = { home: accountHome };
7161
7161
  var realOrSelf = (file) => {
7162
7162
  try {
7163
- return realpathSync.native(file);
7163
+ return realpathSync2.native(file);
7164
7164
  } catch {
7165
7165
  return path4.resolve(file);
7166
7166
  }
@@ -7555,8 +7555,8 @@ var probeCheckout = (cwd) => {
7555
7555
  if (cached !== undefined)
7556
7556
  return cached;
7557
7557
  let dir = path5.resolve(cwd);
7558
- while (!existsSync2(path5.join(dir, ".git"))) {
7559
- if (["HEAD", "objects", "refs"].every((name) => existsSync2(path5.join(dir, name)))) {
7558
+ while (!existsSync3(path5.join(dir, ".git"))) {
7559
+ if (["HEAD", "objects", "refs"].every((name) => existsSync3(path5.join(dir, name)))) {
7560
7560
  const real = realpathOf(dir);
7561
7561
  const owner = ownInternals(real) === true ? gitDirOwner(real) : null;
7562
7562
  if (owner === null)
@@ -7640,7 +7640,7 @@ var ownInternals = (real) => {
7640
7640
  }
7641
7641
  let resolved;
7642
7642
  try {
7643
- resolved = (realpathSync2.native ?? realpathSync2)(at);
7643
+ resolved = (realpathSync3.native ?? realpathSync3)(at);
7644
7644
  } catch {
7645
7645
  return false;
7646
7646
  }
@@ -7698,7 +7698,7 @@ var matchingEntries = (cwd, entries) => {
7698
7698
  return main ? match(main) : direct;
7699
7699
  };
7700
7700
  var realpathOf = (p) => {
7701
- const real = realpathSync2.native ?? realpathSync2;
7701
+ const real = realpathSync3.native ?? realpathSync3;
7702
7702
  try {
7703
7703
  return real(p);
7704
7704
  } catch {
@@ -10953,14 +10953,14 @@ function acquireFileLockSync(targetPath, options) {
10953
10953
  }
10954
10954
  }
10955
10955
  // packages/workit-core/src/core/package-root.ts
10956
- import { existsSync as existsSync3 } from "node:fs";
10956
+ import { existsSync as existsSync4 } from "node:fs";
10957
10957
  import path11 from "node:path";
10958
10958
  import { fileURLToPath } from "node:url";
10959
10959
  var packageRoot = () => {
10960
10960
  let dir = path11.dirname(fileURLToPath(import.meta.url));
10961
10961
  while (true) {
10962
10962
  const parent = path11.dirname(dir);
10963
- if (existsSync3(path11.join(dir, "package.json")) || parent === dir)
10963
+ if (existsSync4(path11.join(dir, "package.json")) || parent === dir)
10964
10964
  return dir;
10965
10965
  dir = parent;
10966
10966
  }
@@ -12240,7 +12240,7 @@ class TaskReader {
12240
12240
  }
12241
12241
 
12242
12242
  // packages/workit-core/src/core/policy/derive.ts
12243
- import { existsSync as existsSync6 } from "node:fs";
12243
+ import { existsSync as existsSync7 } from "node:fs";
12244
12244
  import path17 from "node:path";
12245
12245
 
12246
12246
  // packages/workit-core/src/ledger.ts
@@ -12327,7 +12327,7 @@ function bookkeepingPaths(cwd, input) {
12327
12327
  }
12328
12328
 
12329
12329
  // packages/workit-core/src/core/policy/lane.ts
12330
- import { existsSync as existsSync5, readFileSync as readFileSync7 } from "node:fs";
12330
+ import { existsSync as existsSync6, readFileSync as readFileSync7 } from "node:fs";
12331
12331
  import path14 from "node:path";
12332
12332
 
12333
12333
  // packages/workit-core/src/git/default-base.ts
@@ -14427,7 +14427,7 @@ var productDecision = (task, ledger) => {
14427
14427
  };
14428
14428
  };
14429
14429
  var planRecorded = (task, root) => {
14430
- const cited = (latestJudgment(task)?.refs ?? []).find((ref) => ref.kind === "external" || ref.kind === "file" && existsSync6(path17.resolve(root, ref.path)));
14430
+ const cited = (latestJudgment(task)?.refs ?? []).find((ref) => ref.kind === "external" || ref.kind === "file" && existsSync7(path17.resolve(root, ref.path)));
14431
14431
  if (cited)
14432
14432
  return {
14433
14433
  met: true,
@@ -15074,7 +15074,7 @@ function evaluateRequirements(task, workspace, capabilities, candidate, checkout
15074
15074
  }
15075
15075
 
15076
15076
  // packages/workit-core/src/core/task-view.ts
15077
- import { realpathSync as realpathSync5 } from "node:fs";
15077
+ import { realpathSync as realpathSync6 } from "node:fs";
15078
15078
 
15079
15079
  // packages/workit-core/src/core/task-context.ts
15080
15080
  var COMPACT_MAX_BYTES = 4096;
@@ -15175,7 +15175,7 @@ var environment = () => [];
15175
15175
  var sameSession2 = (value, context) => typeof value === "object" && value !== null && value.kind === "host" && value.host === context.caller.host && value.handle === context.caller.actor;
15176
15176
  function contextRootError(store, context) {
15177
15177
  try {
15178
- realpathSync5(context.root);
15178
+ realpathSync6(context.root);
15179
15179
  const root = checkoutRootOf(context.root);
15180
15180
  if (root !== store.root && !sameDirectoryIdentity(root, store.root))
15181
15181
  return failure2("invalid_input", "operation context root does not match the task store root");
@@ -15507,7 +15507,7 @@ var seedTurnContext = (input, descriptor, text = turnContextText(input, descript
15507
15507
  };
15508
15508
  // packages/workit-core/src/core/route-intent.ts
15509
15509
  import { spawnSync as spawnSync14 } from "node:child_process";
15510
- import { existsSync as existsSync9 } from "node:fs";
15510
+ import { existsSync as existsSync10 } from "node:fs";
15511
15511
  import path25 from "node:path";
15512
15512
 
15513
15513
  // packages/workit-core/src/hooks/raw-git.ts
@@ -15521,7 +15521,7 @@ import path24 from "node:path";
15521
15521
  import path22 from "node:path";
15522
15522
 
15523
15523
  // packages/workit-core/src/core/eval-world.ts
15524
- import { existsSync as existsSync8, realpathSync as realpathSync6 } from "node:fs";
15524
+ import { existsSync as existsSync9, realpathSync as realpathSync7 } from "node:fs";
15525
15525
  import os4 from "node:os";
15526
15526
  import path20 from "node:path";
15527
15527
  var EVAL_WORLD_ENV = "WORKIT_EVAL_WORLD";
@@ -15535,8 +15535,8 @@ var evalWorld = (cwd) => {
15535
15535
  if (!raw || !path20.isAbsolute(raw))
15536
15536
  return null;
15537
15537
  try {
15538
- const world = realpathSync6(raw);
15539
- return inside2(realpathSync6(os4.tmpdir()), world) && inside2(world, realpathSync6(cwd)) && existsSync8(path20.join(world, EVAL_WORLD_MARKER)) ? world : null;
15538
+ const world = realpathSync7(raw);
15539
+ return inside2(realpathSync7(os4.tmpdir()), world) && inside2(world, realpathSync7(cwd)) && existsSync9(path20.join(world, EVAL_WORLD_MARKER)) ? world : null;
15540
15540
  } catch {
15541
15541
  return null;
15542
15542
  }
@@ -18564,7 +18564,7 @@ var judgedDir = (root, dir) => {
18564
18564
  if (dir === null)
18565
18565
  return root;
18566
18566
  const resolved = path25.resolve(root, dir);
18567
- return existsSync9(resolved) && inWorkitWorkspace(resolved) ? resolved : null;
18567
+ return existsSync10(resolved) && inWorkitWorkspace(resolved) ? resolved : null;
18568
18568
  };
18569
18569
  var shellBranchPolicyViolation = (root, command, dialect = "posix") => {
18570
18570
  let judged = false;
@@ -19438,11 +19438,11 @@ var splitDenial = (plan) => ({
19438
19438
  });
19439
19439
  // packages/workit-core/src/hooks/write-gate.ts
19440
19440
  import {
19441
- existsSync as existsSync10,
19441
+ existsSync as existsSync11,
19442
19442
  readdirSync as readdirSync3,
19443
19443
  readFileSync as readFileSync10,
19444
- readlinkSync as readlinkSync2,
19445
- realpathSync as realpathSync7,
19444
+ readlinkSync as readlinkSync3,
19445
+ realpathSync as realpathSync8,
19446
19446
  statSync as statSync3
19447
19447
  } from "node:fs";
19448
19448
  import os8 from "node:os";
@@ -19654,10 +19654,10 @@ var NONE3 = { kind: "none" };
19654
19654
  var CASE_INSENSITIVE = process.platform === "darwin" || process.platform === "win32";
19655
19655
  var linkTarget = (file) => {
19656
19656
  try {
19657
- const to = readlinkSync2(file);
19657
+ const to = readlinkSync3(file);
19658
19658
  let from = path29.dirname(file);
19659
19659
  try {
19660
- from = realpathSync7.native(from);
19660
+ from = realpathSync8.native(from);
19661
19661
  } catch {}
19662
19662
  return path29.resolve(from, to);
19663
19663
  } catch {
@@ -19669,7 +19669,7 @@ var realPath = (file, dangling = true) => {
19669
19669
  let rest = "";
19670
19670
  for (let hops = 0;; ) {
19671
19671
  try {
19672
- return path29.join(realpathSync7.native(dir), rest);
19672
+ return path29.join(realpathSync8.native(dir), rest);
19673
19673
  } catch {
19674
19674
  const link = dangling ? linkTarget(dir) : null;
19675
19675
  if (link !== null) {
@@ -20124,7 +20124,7 @@ var linkSources = (args, at) => {
20124
20124
  const sources = names.filter((name, index) => into >= 0 ? name !== dest : index < names.length - 1 || names.length === 1);
20125
20125
  const target = dest === undefined ? null : at(dest);
20126
20126
  const symbolic = args.some((arg) => /^-[a-zA-Z]*s|^--symbolic$/.test(arg));
20127
- const base = target === null ? null : into >= 0 || sources.length > 1 || existsSync10(target) || /[\\/]$/.test(dest ?? "") ? target : path29.dirname(target);
20127
+ const base = target === null ? null : into >= 0 || sources.length > 1 || existsSync11(target) || /[\\/]$/.test(dest ?? "") ? target : path29.dirname(target);
20128
20128
  return sources.flatMap((source) => {
20129
20129
  if (symbolic && base !== null && !path29.isAbsolute(homeExpanded(source)))
20130
20130
  return [path29.resolve(base, source)];
@@ -21570,16 +21570,16 @@ ${line}` };
21570
21570
  return decision;
21571
21571
  };
21572
21572
  // packages/workit-core/src/hooks/hosts/fields.ts
21573
- import { existsSync as existsSync11, realpathSync as realpathSync8, statSync as statSync4 } from "node:fs";
21573
+ import { existsSync as existsSync12, realpathSync as realpathSync9, statSync as statSync4 } from "node:fs";
21574
21574
  import path31 from "node:path";
21575
21575
  var isRecord6 = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
21576
21576
  var nonEmpty2 = (value) => typeof value === "string" && value.trim() !== "";
21577
21577
  var optionalText = (value) => typeof value === "string" ? value : null;
21578
21578
  var existingDirectory = (value) => {
21579
- if (!nonEmpty2(value) || !path31.isAbsolute(value) || !existsSync11(value))
21579
+ if (!nonEmpty2(value) || !path31.isAbsolute(value) || !existsSync12(value))
21580
21580
  return null;
21581
21581
  try {
21582
- return statSync4(value).isDirectory() ? realpathSync8(value) : null;
21582
+ return statSync4(value).isDirectory() ? realpathSync9(value) : null;
21583
21583
  } catch {
21584
21584
  return null;
21585
21585
  }
@@ -98,7 +98,7 @@ if (quiet) {
98
98
  `);
99
99
  } else {
100
100
  try {
101
- const { runCodexHook } = await import("./workit-hook-475yp2qr.js");
101
+ const { runCodexHook } = await import("./workit-hook-hqw6yaxq.js");
102
102
  await runCodexHook([payload]);
103
103
  } catch (error) {
104
104
  const { answerRuntimeFailure } = await import("./workit-hook-9k8dtngs.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/codex",
3
- "version": "2.4.1",
3
+ "version": "2.4.3",
4
4
  "private": false,
5
5
  "description": "Workit Codex CLI/desktop plugin — shared MCP transport, hooks, method skills, and verifier/reviewer/implementer agents",
6
6
  "keywords": [
@@ -41,8 +41,8 @@
41
41
  "build": "bun scripts/build.ts"
42
42
  },
43
43
  "devDependencies": {
44
- "@workit-dev/core": "^2.4.1",
45
- "@workit-dev/mcp": "^2.4.1"
44
+ "@workit-dev/core": "^2.4.3",
45
+ "@workit-dev/mcp": "^2.4.3"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24"