@workit-dev/mcp 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/index.js +21 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24356,6 +24356,19 @@ function verdictBasis(verdict, current) {
|
|
|
24356
24356
|
return "stale";
|
|
24357
24357
|
}
|
|
24358
24358
|
var isLiveVerdict = (row, retired) => row.type === "verdict" && typeof row.result === "string" && !retired.has(row.id);
|
|
24359
|
+
var VOID_TYPE = "verdict.voided";
|
|
24360
|
+
function verdictVoids(rows, options = {}) {
|
|
24361
|
+
const voids = new Map;
|
|
24362
|
+
for (const row of rows)
|
|
24363
|
+
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))
|
|
24364
|
+
voids.set(row.target, {
|
|
24365
|
+
id: row.id,
|
|
24366
|
+
at: row.at,
|
|
24367
|
+
reason: str2(row.reason) ?? "",
|
|
24368
|
+
by: row.actor.session
|
|
24369
|
+
});
|
|
24370
|
+
return voids;
|
|
24371
|
+
}
|
|
24359
24372
|
function trailerSessions(cwd, base, head) {
|
|
24360
24373
|
if (!base || !head || !safeRef2(base) || !safeRef2(head))
|
|
24361
24374
|
return [];
|
|
@@ -24694,6 +24707,8 @@ function checkVerdictsOnce(cwd, branch, ledgerRows) {
|
|
|
24694
24707
|
for (const row of rows)
|
|
24695
24708
|
if (row.type === "verdict" && row.supersedes && !row.supersedeIgnored && trustReasons(cwd, row).length === 0)
|
|
24696
24709
|
retired.add(row.supersedes);
|
|
24710
|
+
for (const id of verdictVoids(rows, { chained: true }).keys())
|
|
24711
|
+
retired.add(id);
|
|
24697
24712
|
const byKind = new Map;
|
|
24698
24713
|
for (const row of rows.toSorted(byRank))
|
|
24699
24714
|
if (isLiveVerdict(row, retired) && scope(row)) {
|
|
@@ -24827,7 +24842,7 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
24827
24842
|
const mirror = readLedgerAt(cwd, file, { integrity: true });
|
|
24828
24843
|
if (!mirror.ok)
|
|
24829
24844
|
return [];
|
|
24830
|
-
const candidates = mirror.value.rows.filter((row) => row.type === "verdict" && row.branch === branch && row.integrity === "verified");
|
|
24845
|
+
const candidates = mirror.value.rows.filter((row) => (row.type === "verdict" || row.type === VOID_TYPE) && row.branch === branch && row.integrity === "verified");
|
|
24831
24846
|
const added = new Set;
|
|
24832
24847
|
try {
|
|
24833
24848
|
fs14.mkdirSync(path18.dirname(local.value), { recursive: true });
|
|
@@ -24853,7 +24868,10 @@ function importMirroredVerdicts(cwd, branch) {
|
|
|
24853
24868
|
integrityReason: _reason,
|
|
24854
24869
|
...fields
|
|
24855
24870
|
} = row;
|
|
24856
|
-
const written = appendLine(local.value, (previous) => ({
|
|
24871
|
+
const written = appendLine(local.value, (previous) => ({
|
|
24872
|
+
ok: true,
|
|
24873
|
+
value: sealed(fields, id, at, previous).line
|
|
24874
|
+
}), { heldLock: true });
|
|
24857
24875
|
if (!written.ok)
|
|
24858
24876
|
return false;
|
|
24859
24877
|
ids.add(id);
|
|
@@ -24872,6 +24890,7 @@ var OBSERVED_ONLY = new Set([
|
|
|
24872
24890
|
"check",
|
|
24873
24891
|
"merge.unverified",
|
|
24874
24892
|
"policy.judged",
|
|
24893
|
+
"verdict.voided",
|
|
24875
24894
|
...PR_ROW_TYPES
|
|
24876
24895
|
]);
|
|
24877
24896
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workit-dev/mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
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.
|
|
47
|
+
"@workit-dev/core": "^1.2.2",
|
|
48
48
|
"zod": "4.6.5"
|
|
49
49
|
},
|
|
50
50
|
"engines": {
|