@workit-dev/codex 1.2.1 → 1.2.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.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Adaptive engineering workflow rails for Codex",
5
5
  "author": {
6
6
  "name": "BrainerVirus"
@@ -22037,6 +22037,19 @@ function verdictBasis(verdict, current) {
22037
22037
  return "stale";
22038
22038
  }
22039
22039
  var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
22040
+ var VOID_TYPE = "verdict.voided";
22041
+ function verdictVoids(rows, options = {}) {
22042
+ const voids = new Map;
22043
+ for (const row of rows)
22044
+ if (row.type === VOID_TYPE && row.observer === "workit_cli" && typeof row.target === "string" && (options.chained ? row.integrity === "verified" : row.integrity !== "unverified") && !voids.has(row.target))
22045
+ voids.set(row.target, {
22046
+ id: row.id,
22047
+ at: row.at,
22048
+ reason: str2(row.reason) ?? "",
22049
+ by: row.actor.session
22050
+ });
22051
+ return voids;
22052
+ }
22040
22053
  function trailerSessions(cwd, base, head) {
22041
22054
  if (!base || !head || !safeRef2(base) || !safeRef2(head))
22042
22055
  return [];
@@ -22375,6 +22388,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
22375
22388
  for (const row of rows)
22376
22389
  if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
22377
22390
  retired.add(row.supersedes);
22391
+ for (const id of verdictVoids(rows, { chained: true }).keys())
22392
+ retired.add(id);
22378
22393
  const byKind = new Map;
22379
22394
  for (const row of rows.toSorted(byRank))
22380
22395
  if (isLiveVerdict(row, retired) && scope(row)) {
@@ -22508,7 +22523,7 @@ function importMirroredVerdicts(cwd, branch) {
22508
22523
  const mirror = readLedgerAt(cwd, file, { integrity: true });
22509
22524
  if (!mirror.ok)
22510
22525
  return [];
22511
- const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
22526
+ const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
22512
22527
  const added = new Set;
22513
22528
  try {
22514
22529
  fs15.mkdirSync(path19.dirname(local.value), { recursive: true });
@@ -22534,7 +22549,10 @@ function importMirroredVerdicts(cwd, branch) {
22534
22549
  integrityReason: _reason,
22535
22550
  ...fields
22536
22551
  } = row;
22537
- const written = appendLine(local.value, (previous) => ({ ok: true, value: sealed(fields, id, at, previous).line }), { heldLock: true });
22552
+ const written = appendLine(local.value, (previous) => ({
22553
+ ok: true,
22554
+ value: sealed(fields, id, at, previous).line
22555
+ }), { heldLock: true });
22538
22556
  if (!written.ok)
22539
22557
  return false;
22540
22558
  ids.add(id);
@@ -22553,6 +22571,7 @@ var OBSERVED_ONLY = new Set([
22553
22571
  "check",
22554
22572
  "merge.unverified",
22555
22573
  "policy.judged",
22574
+ "verdict.voided",
22556
22575
  ...PR_ROW_TYPES
22557
22576
  ]);
22558
22577
 
@@ -14938,6 +14938,19 @@ function verdictBasis(verdict, current) {
14938
14938
  return "stale";
14939
14939
  }
14940
14940
  var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
14941
+ var VOID_TYPE = "verdict.voided";
14942
+ function verdictVoids(rows, options = {}) {
14943
+ const voids = new Map;
14944
+ for (const row of rows)
14945
+ if (row.type === VOID_TYPE && row.observer === "workit_cli" && typeof row.target === "string" && (options.chained ? row.integrity === "verified" : row.integrity !== "unverified") && !voids.has(row.target))
14946
+ voids.set(row.target, {
14947
+ id: row.id,
14948
+ at: row.at,
14949
+ reason: str(row.reason) ?? "",
14950
+ by: row.actor.session
14951
+ });
14952
+ return voids;
14953
+ }
14941
14954
  function trailerSessions(cwd, base, head) {
14942
14955
  if (!base || !head || !safeRef2(base) || !safeRef2(head))
14943
14956
  return [];
@@ -15276,6 +15289,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
15276
15289
  for (const row of rows)
15277
15290
  if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
15278
15291
  retired.add(row.supersedes);
15292
+ for (const id of verdictVoids(rows, { chained: true }).keys())
15293
+ retired.add(id);
15279
15294
  const byKind = new Map;
15280
15295
  for (const row of rows.toSorted(byRank))
15281
15296
  if (isLiveVerdict(row, retired) && scope(row)) {
@@ -15409,7 +15424,7 @@ function importMirroredVerdicts(cwd, branch) {
15409
15424
  const mirror = readLedgerAt(cwd, file, { integrity: true });
15410
15425
  if (!mirror.ok)
15411
15426
  return [];
15412
- const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
15427
+ const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
15413
15428
  const added = new Set;
15414
15429
  try {
15415
15430
  fs12.mkdirSync(path16.dirname(local.value), { recursive: true });
@@ -15435,7 +15450,10 @@ function importMirroredVerdicts(cwd, branch) {
15435
15450
  integrityReason: _reason,
15436
15451
  ...fields
15437
15452
  } = row;
15438
- const written = appendLine(local.value, (previous) => ({ ok: true, value: sealed(fields, id, at, previous).line }), { heldLock: true });
15453
+ const written = appendLine(local.value, (previous) => ({
15454
+ ok: true,
15455
+ value: sealed(fields, id, at, previous).line
15456
+ }), { heldLock: true });
15439
15457
  if (!written.ok)
15440
15458
  return false;
15441
15459
  ids.add(id);
@@ -15476,6 +15494,7 @@ var OBSERVED_ONLY = new Set([
15476
15494
  "check",
15477
15495
  "merge.unverified",
15478
15496
  "policy.judged",
15497
+ "verdict.voided",
15479
15498
  ...PR_ROW_TYPES
15480
15499
  ]);
15481
15500
 
@@ -19287,7 +19306,8 @@ var WORKIT_BYPASS_FLAGS = ["--unverified", "--overwrite-unintegrated"];
19287
19306
  var WORKIT_USER_ONLY = [
19288
19307
  ["release", "notes", "approve"],
19289
19308
  ["grant", "set"],
19290
- ["grant", "raise"]
19309
+ ["grant", "raise"],
19310
+ ["ledger", "void"]
19291
19311
  ];
19292
19312
  var ALLOWED = new Set(WORKIT_ALLOWED_VERBS);
19293
19313
  var hasWordsInOrder = (words, needle) => {
@@ -84,7 +84,7 @@ if (quiet) {
84
84
  `);
85
85
  } else {
86
86
  try {
87
- const { runCodexHook } = await import("./workit-hook-nsn8wg8v.js");
87
+ const { runCodexHook } = await import("./workit-hook-z2g841xy.js");
88
88
  await runCodexHook([payload]);
89
89
  } catch (error) {
90
90
  const { answerRuntimeFailure } = await import("./workit-hook-ehy7rps6.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/codex",
3
- "version": "1.2.1",
3
+ "version": "1.2.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.2.1",
45
- "@workit-dev/mcp": "^1.2.1"
44
+ "@workit-dev/core": "^1.2.2",
45
+ "@workit-dev/mcp": "^1.2.2"
46
46
  },
47
47
  "engines": {
48
48
  "node": ">=24"