@workit-dev/codex 1.14.1 → 1.14.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workit",
3
- "version": "1.14.1",
3
+ "version": "1.14.2",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -16937,11 +16937,13 @@ function fastGit(root) {
16937
16937
  }
16938
16938
  function resolveStore(root) {
16939
16939
  root = path9.resolve(root);
16940
- let directory = false;
16940
+ let stat = null;
16941
16941
  try {
16942
- directory = fs5.statSync(root).isDirectory();
16942
+ stat = fs5.statSync(root);
16943
16943
  } catch {}
16944
- if (!directory)
16944
+ if (!stat)
16945
+ return new Error(`cannot locate the workit store: ${root} does not exist (removed while workit ran?); nothing is recorded under a missing directory`);
16946
+ if (!stat.isDirectory())
16945
16947
  return { dir: path9.join(root, ".workit"), shared: false, top: null };
16946
16948
  const fast = fastGit(root);
16947
16949
  if (fast?.kind === "none")
@@ -21699,7 +21701,7 @@ function cleanRebase(cwd, range) {
21699
21701
  function storeRoot(cwd) {
21700
21702
  const location = resolveStore(path20.resolve(cwd));
21701
21703
  if (location instanceof Error)
21702
- return err("unavailable", location.message.replace(/; fix the repository.*$/u, ""), "fix the repository (git status should work here) or run from a non-git directory");
21704
+ return err("unavailable", location.message.replace(/; fix the repository.*$/u, ""), / does not exist /u.test(location.message) ? "run workit from a directory that exists" : "fix the repository (git status should work here) or run from a non-git directory");
21703
21705
  return { ok: true, value: { root: location.dir, shared: location.shared } };
21704
21706
  }
21705
21707
  function ledgerPath(cwd) {
@@ -21900,7 +21902,7 @@ var sealed = (row, id, at, previous) => {
21900
21902
  ` };
21901
21903
  };
21902
21904
  function appendRaw(cwd, row, options) {
21903
- const file = ledgerPath(cwd);
21905
+ const file = options.store ? { ok: true, value: path20.join(options.store.root, "ledger", "ledger.jsonl") } : ledgerPath(cwd);
21904
21906
  if (!file.ok)
21905
21907
  return file;
21906
21908
  const id = newId2();
@@ -9352,11 +9352,13 @@ function fastGit(root) {
9352
9352
  }
9353
9353
  function resolveStore(root) {
9354
9354
  root = path8.resolve(root);
9355
- let directory = false;
9355
+ let stat = null;
9356
9356
  try {
9357
- directory = fs4.statSync(root).isDirectory();
9357
+ stat = fs4.statSync(root);
9358
9358
  } catch {}
9359
- if (!directory)
9359
+ if (!stat)
9360
+ return new Error(`cannot locate the workit store: ${root} does not exist (removed while workit ran?); nothing is recorded under a missing directory`);
9361
+ if (!stat.isDirectory())
9360
9362
  return { dir: path8.join(root, ".workit"), shared: false, top: null };
9361
9363
  const fast = fastGit(root);
9362
9364
  if (fast?.kind === "none")
@@ -13392,7 +13394,7 @@ function cleanRebase(cwd, range) {
13392
13394
  function storeRoot(cwd) {
13393
13395
  const location = resolveStore(path16.resolve(cwd));
13394
13396
  if (location instanceof Error)
13395
- return err("unavailable", location.message.replace(/; fix the repository.*$/u, ""), "fix the repository (git status should work here) or run from a non-git directory");
13397
+ return err("unavailable", location.message.replace(/; fix the repository.*$/u, ""), / does not exist /u.test(location.message) ? "run workit from a directory that exists" : "fix the repository (git status should work here) or run from a non-git directory");
13396
13398
  return { ok: true, value: { root: location.dir, shared: location.shared } };
13397
13399
  }
13398
13400
  function ledgerPath(cwd) {
@@ -13593,7 +13595,7 @@ var sealed = (row, id, at, previous) => {
13593
13595
  ` };
13594
13596
  };
13595
13597
  function appendRaw(cwd, row, options) {
13596
- const file = ledgerPath(cwd);
13598
+ const file = options.store ? { ok: true, value: path16.join(options.store.root, "ledger", "ledger.jsonl") } : ledgerPath(cwd);
13597
13599
  if (!file.ok)
13598
13600
  return file;
13599
13601
  const id = newId2();
@@ -102,7 +102,7 @@ if (quiet) {
102
102
  `);
103
103
  } else {
104
104
  try {
105
- const { runCodexHook } = await import("./workit-hook-md42hk0a.js");
105
+ const { runCodexHook } = await import("./workit-hook-fz351gv7.js");
106
106
  await runCodexHook([payload]);
107
107
  } catch (error) {
108
108
  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": "1.14.1",
3
+ "version": "1.14.2",
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": "^1.14.1",
45
- "@workit-dev/mcp": "^1.14.1"
44
+ "@workit-dev/core": "^1.14.2",
45
+ "@workit-dev/mcp": "^1.14.2"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24"