@brainervirus/workit-codex 8.31.0 → 8.32.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workit",
3
- "version": "8.31.0",
3
+ "version": "8.32.0",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -14950,6 +14950,7 @@ var workspaceConfigSchema = object({
14950
14950
  verification: _enum(["proportional", "self", "independent"]).optional(),
14951
14951
  delegation: unknown().optional(),
14952
14952
  trailers: boolean2().optional(),
14953
+ deleteBranch: boolean2().optional(),
14953
14954
  liveSessionGuard: boolean2().optional(),
14954
14955
  fanout: object({ tierModels: unknown().optional() }).passthrough().optional(),
14955
14956
  models: object({ roles: unknown().optional() }).passthrough().optional(),
@@ -20240,6 +20241,18 @@ function diffHash(cwd, base, head) {
20240
20241
  }
20241
20242
  return `sha256:${hash.digest("hex")}`;
20242
20243
  }
20244
+ function cleanRebase(cwd, range) {
20245
+ if (!Object.values(range).every(safeRef2))
20246
+ return false;
20247
+ const fromFork = git4(cwd, ["merge-base", range.fromBase, range.from]);
20248
+ const toFork = git4(cwd, ["merge-base", range.toBase, range.to]);
20249
+ if (!fromFork || !toFork || fromFork === toFork)
20250
+ return false;
20251
+ const merged = gitRun2(cwd, ["merge-tree", "--write-tree", "--no-messages", `--merge-base=${fromFork}`, toFork, range.from], GIT_TIMEOUTS.worktree);
20252
+ const tree = merged.ok ? merged.stdout.split(`
20253
+ `)[0]?.trim() : null;
20254
+ return Boolean(tree) && tree === git4(cwd, ["rev-parse", "--verify", "-q", `${range.to}^{tree}`]);
20255
+ }
20243
20256
  function storeRoot(cwd) {
20244
20257
  const location = resolveStore(path15.resolve(cwd));
20245
20258
  if (location instanceof Error)
@@ -20900,23 +20913,24 @@ function checkVerdicts(cwd, branch, ledgerRows) {
20900
20913
  return drift;
20901
20914
  };
20902
20915
  const exactCache = new Map;
20903
- const exactCarry = (row) => {
20904
- if (FAILING.has(String(row.result)))
20905
- return true;
20916
+ const exactMatch = (row) => {
20906
20917
  let exact = exactCache.get(row);
20907
20918
  if (exact === undefined) {
20908
20919
  const toBase = row.base ?? fallbackBase;
20909
20920
  const toBaseSha = toBase ? resolveCommit(cwd, toBase) : null;
20910
20921
  const fromBase = row.baseSha ?? toBaseSha;
20911
- exact = Boolean(row.head && head && toBaseSha && fromBase && sameOwnChange(cwd, { from: row.head, to: head, fromBase, toBase: toBaseSha }));
20922
+ const range = row.head && head && toBaseSha && fromBase ? { from: row.head, to: head, fromBase, toBase: toBaseSha } : null;
20923
+ exact = !range ? null : sameOwnChange(cwd, range) ? "same" : cleanRebase(cwd, range) ? "rebase" : null;
20912
20924
  exactCache.set(row, exact);
20913
20925
  }
20914
20926
  return exact;
20915
20927
  };
20928
+ const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
20916
20929
  const keyBasis = (row) => {
20917
20930
  const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
20918
20931
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
20919
20932
  };
20933
+ const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
20920
20934
  const restacked = (row) => restackCarries(FAILING.has(String(row.result)) ? null : cwd, rows, branch, row.head, head);
20921
20935
  const carryOf = (row) => {
20922
20936
  if (keyBasis(row) !== "stale")
@@ -20994,7 +21008,7 @@ function checkVerdicts(cwd, branch, ledgerRows) {
20994
21008
  independent: independence.length === 0,
20995
21009
  accepted: reasons.length === 0,
20996
21010
  reasons,
20997
- carry: basis === "carried" ? carryOf(row) : null,
21011
+ carry: basis === "carried" ? rebaseNote(row) ?? carryOf(row) : null,
20998
21012
  verdict: row
20999
21013
  });
21000
21014
  if (reasons.length === 0) {
@@ -6283,6 +6283,7 @@ var workspaceConfigSchema = object({
6283
6283
  verification: _enum(["proportional", "self", "independent"]).optional(),
6284
6284
  delegation: unknown().optional(),
6285
6285
  trailers: boolean2().optional(),
6286
+ deleteBranch: boolean2().optional(),
6286
6287
  liveSessionGuard: boolean2().optional(),
6287
6288
  fanout: object({ tierModels: unknown().optional() }).passthrough().optional(),
6288
6289
  models: object({ roles: unknown().optional() }).passthrough().optional(),
@@ -13049,6 +13050,18 @@ function diffHash(cwd, base, head) {
13049
13050
  }
13050
13051
  return `sha256:${hash.digest("hex")}`;
13051
13052
  }
13053
+ function cleanRebase(cwd, range) {
13054
+ if (!Object.values(range).every(safeRef2))
13055
+ return false;
13056
+ const fromFork = git3(cwd, ["merge-base", range.fromBase, range.from]);
13057
+ const toFork = git3(cwd, ["merge-base", range.toBase, range.to]);
13058
+ if (!fromFork || !toFork || fromFork === toFork)
13059
+ return false;
13060
+ const merged = gitRun2(cwd, ["merge-tree", "--write-tree", "--no-messages", `--merge-base=${fromFork}`, toFork, range.from], GIT_TIMEOUTS.worktree);
13061
+ const tree = merged.ok ? merged.stdout.split(`
13062
+ `)[0]?.trim() : null;
13063
+ return Boolean(tree) && tree === git3(cwd, ["rev-parse", "--verify", "-q", `${range.to}^{tree}`]);
13064
+ }
13052
13065
  function storeRoot(cwd) {
13053
13066
  const location = resolveStore(path14.resolve(cwd));
13054
13067
  if (location instanceof Error)
@@ -13712,23 +13725,24 @@ function checkVerdicts(cwd, branch, ledgerRows) {
13712
13725
  return drift;
13713
13726
  };
13714
13727
  const exactCache = new Map;
13715
- const exactCarry = (row) => {
13716
- if (FAILING.has(String(row.result)))
13717
- return true;
13728
+ const exactMatch = (row) => {
13718
13729
  let exact = exactCache.get(row);
13719
13730
  if (exact === undefined) {
13720
13731
  const toBase = row.base ?? fallbackBase;
13721
13732
  const toBaseSha = toBase ? resolveCommit(cwd, toBase) : null;
13722
13733
  const fromBase = row.baseSha ?? toBaseSha;
13723
- exact = Boolean(row.head && head && toBaseSha && fromBase && sameOwnChange(cwd, { from: row.head, to: head, fromBase, toBase: toBaseSha }));
13734
+ const range = row.head && head && toBaseSha && fromBase ? { from: row.head, to: head, fromBase, toBase: toBaseSha } : null;
13735
+ exact = !range ? null : sameOwnChange(cwd, range) ? "same" : cleanRebase(cwd, range) ? "rebase" : null;
13724
13736
  exactCache.set(row, exact);
13725
13737
  }
13726
13738
  return exact;
13727
13739
  };
13740
+ const exactCarry = (row) => FAILING.has(String(row.result)) || exactMatch(row) !== null;
13728
13741
  const keyBasis = (row) => {
13729
13742
  const basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
13730
13743
  return basis === "carried" && !exactCarry(row) ? "stale" : basis;
13731
13744
  };
13745
+ const rebaseNote = (row) => row.head && head && row.head !== head && !FAILING.has(String(row.result)) && keyBasis(row) === "carried" && exactMatch(row) === "rebase" ? { rule: "rebase", since: row.head, files: [] } : null;
13732
13746
  const restacked = (row) => restackCarries(FAILING.has(String(row.result)) ? null : cwd, rows, branch, row.head, head);
13733
13747
  const carryOf = (row) => {
13734
13748
  if (keyBasis(row) !== "stale")
@@ -13806,7 +13820,7 @@ function checkVerdicts(cwd, branch, ledgerRows) {
13806
13820
  independent: independence.length === 0,
13807
13821
  accepted: reasons.length === 0,
13808
13822
  reasons,
13809
- carry: basis === "carried" ? carryOf(row) : null,
13823
+ carry: basis === "carried" ? rebaseNote(row) ?? carryOf(row) : null,
13810
13824
  verdict: row
13811
13825
  });
13812
13826
  if (reasons.length === 0) {
@@ -79,6 +79,6 @@ if (quiet)
79
79
  process.stdout.write(`${JSON.stringify({ hookSpecificOutput: { hookEventName: quiet } })}
80
80
  `);
81
81
  else {
82
- const { runCodexHook } = await import("./workit-hook-he62a8pe.js");
82
+ const { runCodexHook } = await import("./workit-hook-pmdzgzzk.js");
83
83
  await runCodexHook([payload]);
84
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brainervirus/workit-codex",
3
- "version": "8.31.0",
3
+ "version": "8.32.0",
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": [
@@ -39,8 +39,8 @@
39
39
  "build": "bun scripts/build.ts"
40
40
  },
41
41
  "devDependencies": {
42
- "@brainervirus/workit-core": "^8.31.0",
43
- "@brainervirus/workit-mcp": "^8.31.0"
42
+ "@brainervirus/workit-core": "^8.32.0",
43
+ "@brainervirus/workit-mcp": "^8.32.0"
44
44
  },
45
45
  "engines": {
46
46
  "node": ">=24"