@workit-dev/mcp 1.2.1 → 1.3.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.
Files changed (2) hide show
  1. package/dist/index.js +23 -2
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -23849,6 +23849,7 @@ var PR_ROW_TYPES = new Set([
23849
23849
  "pr.merged",
23850
23850
  "pr.linked"
23851
23851
  ]);
23852
+ var HOLD_ROW_TYPES = new Set(["branch.hold", "branch.hold.cleared"]);
23852
23853
  var err = (code, error, unblock) => ({
23853
23854
  ok: false,
23854
23855
  code,
@@ -24356,6 +24357,19 @@ function verdictBasis(verdict, current) {
24356
24357
  return "stale";
24357
24358
  }
24358
24359
  var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
24360
+ var VOID_TYPE = "verdict.voided";
24361
+ function verdictVoids(rows, options = {}) {
24362
+ const voids = new Map;
24363
+ for (const row of rows)
24364
+ 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))
24365
+ voids.set(row.target, {
24366
+ id: row.id,
24367
+ at: row.at,
24368
+ reason: str2(row.reason) ?? "",
24369
+ by: row.actor.session
24370
+ });
24371
+ return voids;
24372
+ }
24359
24373
  function trailerSessions(cwd, base, head) {
24360
24374
  if (!base || !head || !safeRef2(base) || !safeRef2(head))
24361
24375
  return [];
@@ -24694,6 +24708,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
24694
24708
  for (const row of rows)
24695
24709
  if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
24696
24710
  retired.add(row.supersedes);
24711
+ for (const id of verdictVoids(rows, { chained: true }).keys())
24712
+ retired.add(id);
24697
24713
  const byKind = new Map;
24698
24714
  for (const row of rows.toSorted(byRank))
24699
24715
  if (isLiveVerdict(row, retired) && scope(row)) {
@@ -24827,7 +24843,7 @@ function importMirroredVerdicts(cwd, branch) {
24827
24843
  const mirror = readLedgerAt(cwd, file, { integrity: true });
24828
24844
  if (!mirror.ok)
24829
24845
  return [];
24830
- const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
24846
+ const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
24831
24847
  const added = new Set;
24832
24848
  try {
24833
24849
  fs14.mkdirSync(path18.dirname(local.value), { recursive: true });
@@ -24853,7 +24869,10 @@ function importMirroredVerdicts(cwd, branch) {
24853
24869
  integrityReason: _reason,
24854
24870
  ...fields
24855
24871
  } = row;
24856
- const written = appendLine(local.value, (previous) => ({ ok: true, value: sealed(fields, id, at, previous).line }), { heldLock: true });
24872
+ const written = appendLine(local.value, (previous) => ({
24873
+ ok: true,
24874
+ value: sealed(fields, id, at, previous).line
24875
+ }), { heldLock: true });
24857
24876
  if (!written.ok)
24858
24877
  return false;
24859
24878
  ids.add(id);
@@ -24872,6 +24891,8 @@ var OBSERVED_ONLY = new Set([
24872
24891
  "check",
24873
24892
  "merge.unverified",
24874
24893
  "policy.judged",
24894
+ "verdict.voided",
24895
+ ...HOLD_ROW_TYPES,
24875
24896
  ...PR_ROW_TYPES
24876
24897
  ]);
24877
24898
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workit-dev/mcp",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "private": false,
5
5
  "description": "Workit shared MCP transport for the eight task and policy operation families",
6
6
  "keywords": [
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@modelcontextprotocol/sdk": "1.32.0",
47
- "@workit-dev/core": "^1.2.1",
47
+ "@workit-dev/core": "^1.3.0",
48
48
  "zod": "4.6.5"
49
49
  },
50
50
  "engines": {