@workit-dev/pi 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.
package/dist/worker.js CHANGED
@@ -8589,6 +8589,7 @@ var OBSERVED_ONLY = new Set([
8589
8589
  "check",
8590
8590
  "merge.unverified",
8591
8591
  "policy.judged",
8592
+ "verdict.voided",
8592
8593
  ...PR_ROW_TYPES
8593
8594
  ]);
8594
8595
 
package/dist/workit.js CHANGED
@@ -16114,6 +16114,19 @@ function verdictBasis(verdict, current) {
16114
16114
  return "stale";
16115
16115
  }
16116
16116
  var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
16117
+ var VOID_TYPE = "verdict.voided";
16118
+ function verdictVoids(rows, options = {}) {
16119
+ const voids = new Map;
16120
+ for (const row of rows)
16121
+ 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))
16122
+ voids.set(row.target, {
16123
+ id: row.id,
16124
+ at: row.at,
16125
+ reason: str2(row.reason) ?? "",
16126
+ by: row.actor.session
16127
+ });
16128
+ return voids;
16129
+ }
16117
16130
  function trailerSessions(cwd, base, head) {
16118
16131
  if (!base || !head || !safeRef2(base) || !safeRef2(head))
16119
16132
  return [];
@@ -16452,6 +16465,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
16452
16465
  for (const row of rows)
16453
16466
  if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
16454
16467
  retired.add(row.supersedes);
16468
+ for (const id of verdictVoids(rows, { chained: true }).keys())
16469
+ retired.add(id);
16455
16470
  const byKind = new Map;
16456
16471
  for (const row of rows.toSorted(byRank))
16457
16472
  if (isLiveVerdict(row, retired) && scope(row)) {
@@ -16585,7 +16600,7 @@ function importMirroredVerdicts(cwd, branch) {
16585
16600
  const mirror = readLedgerAt(cwd, file, { integrity: true });
16586
16601
  if (!mirror.ok)
16587
16602
  return [];
16588
- const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
16603
+ const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
16589
16604
  const added = new Set;
16590
16605
  try {
16591
16606
  fs15.mkdirSync(path19.dirname(local.value), { recursive: true });
@@ -16611,7 +16626,10 @@ function importMirroredVerdicts(cwd, branch) {
16611
16626
  integrityReason: _reason,
16612
16627
  ...fields
16613
16628
  } = row;
16614
- const written = appendLine(local.value, (previous) => ({ ok: true, value: sealed(fields, id, at, previous).line }), { heldLock: true });
16629
+ const written = appendLine(local.value, (previous) => ({
16630
+ ok: true,
16631
+ value: sealed(fields, id, at, previous).line
16632
+ }), { heldLock: true });
16615
16633
  if (!written.ok)
16616
16634
  return false;
16617
16635
  ids.add(id);
@@ -16652,6 +16670,7 @@ var OBSERVED_ONLY = new Set([
16652
16670
  "check",
16653
16671
  "merge.unverified",
16654
16672
  "policy.judged",
16673
+ "verdict.voided",
16655
16674
  ...PR_ROW_TYPES
16656
16675
  ]);
16657
16676
 
@@ -24270,7 +24289,8 @@ var WORKIT_BYPASS_FLAGS = ["--unverified", "--overwrite-unintegrated"];
24270
24289
  var WORKIT_USER_ONLY = [
24271
24290
  ["release", "notes", "approve"],
24272
24291
  ["grant", "set"],
24273
- ["grant", "raise"]
24292
+ ["grant", "raise"],
24293
+ ["ledger", "void"]
24274
24294
  ];
24275
24295
  var ALLOWED = new Set(WORKIT_ALLOWED_VERBS);
24276
24296
  var hasWordsInOrder = (words, needle) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/pi",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Workit native extension for Pi — tools, method skills, and session continuity",
5
5
  "keywords": [
6
6
  "agentic-coding",