@brainervirus/workit-mcp 7.7.0 → 8.0.1
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 +17 -11
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -21562,7 +21562,7 @@ var independenceReasons = (row, authors) => {
|
|
|
21562
21562
|
reasons.push("self");
|
|
21563
21563
|
return reasons;
|
|
21564
21564
|
};
|
|
21565
|
-
function effectiveOf(rows, authors) {
|
|
21565
|
+
function effectiveOf(rows, authors, sameCode) {
|
|
21566
21566
|
let effective = null;
|
|
21567
21567
|
for (const row of rows) {
|
|
21568
21568
|
if (!effective) {
|
|
@@ -21573,7 +21573,7 @@ function effectiveOf(rows, authors) {
|
|
|
21573
21573
|
const effIndependent = independenceReasons(effective, authors).length === 0;
|
|
21574
21574
|
if (effIndependent && !rowIndependent)
|
|
21575
21575
|
continue;
|
|
21576
|
-
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session)
|
|
21576
|
+
if (effIndependent && FAILING.has(String(effective.result)) && row.actor.session === effective.actor.session && sameCode(effective, row))
|
|
21577
21577
|
continue;
|
|
21578
21578
|
effective = row;
|
|
21579
21579
|
}
|
|
@@ -21604,16 +21604,22 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21604
21604
|
const head = branchHead(cwd, branch);
|
|
21605
21605
|
const fallbackBase = defaultBase(cwd);
|
|
21606
21606
|
const keyCache = new Map;
|
|
21607
|
-
const
|
|
21608
|
-
if (!base || !
|
|
21607
|
+
const keysAt = (base, at) => {
|
|
21608
|
+
if (!base || !at)
|
|
21609
21609
|
return { patchId: null, diffHash: null };
|
|
21610
|
-
|
|
21610
|
+
const cacheKey = `${base}\x00${at}`;
|
|
21611
|
+
let key = keyCache.get(cacheKey);
|
|
21611
21612
|
if (!key) {
|
|
21612
|
-
key = { patchId: patchId(cwd, base,
|
|
21613
|
-
keyCache.set(
|
|
21613
|
+
key = { patchId: patchId(cwd, base, at), diffHash: diffHash(cwd, base, at) };
|
|
21614
|
+
keyCache.set(cacheKey, key);
|
|
21614
21615
|
}
|
|
21615
21616
|
return key;
|
|
21616
21617
|
};
|
|
21618
|
+
const keyFor = (base) => keysAt(base, head);
|
|
21619
|
+
const sameCode = (failed, row) => verdictBasis(failed, {
|
|
21620
|
+
head: row.head,
|
|
21621
|
+
...keysAt(failed.base ?? fallbackBase, row.head)
|
|
21622
|
+
}) !== "stale" || restackCarries(rows, branch, failed.head, row.head);
|
|
21617
21623
|
const authors = authorSessions(cwd, rows, branch, { base: fallbackBase, head });
|
|
21618
21624
|
const byKind = new Map;
|
|
21619
21625
|
for (const row of rows)
|
|
@@ -21623,7 +21629,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21623
21629
|
}
|
|
21624
21630
|
const verdicts = [];
|
|
21625
21631
|
for (const [kind, list] of byKind) {
|
|
21626
|
-
const row = effectiveOf(list, authors);
|
|
21632
|
+
const row = effectiveOf(list, authors, sameCode);
|
|
21627
21633
|
if (!row)
|
|
21628
21634
|
continue;
|
|
21629
21635
|
let basis = verdictBasis(row, { head, ...keyFor(row.base ?? fallbackBase) });
|
|
@@ -21649,11 +21655,11 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21649
21655
|
verdicts.sort((a, b) => a.verdict.seq - b.verdict.seq);
|
|
21650
21656
|
const newestCurrent = verdicts.findLast((entry) => entry.current) ?? verdicts.at(-1) ?? null;
|
|
21651
21657
|
const failing = verdicts.find((entry) => entry.current && entry.independent && FAILING.has(String(entry.verdict.result)));
|
|
21652
|
-
const newestAccepted = verdicts.findLast((entry) => entry.accepted) ?? null;
|
|
21658
|
+
const newestAccepted = verdicts.findLast((entry) => entry.accepted && STRONG_RESULTS.has(String(entry.verdict.result))) ?? null;
|
|
21653
21659
|
const accepted = newestAccepted && !failing ? { accepted: true, verdict: newestAccepted.verdict, reasons: [] } : {
|
|
21654
21660
|
accepted: false,
|
|
21655
21661
|
verdict: failing?.verdict ?? null,
|
|
21656
|
-
reasons: failing ? ["failing_verdict"] : newestCurrent
|
|
21662
|
+
reasons: failing ? ["failing_verdict"] : !newestCurrent ? ["no_verdict"] : newestCurrent.reasons.length ? newestCurrent.reasons : ["type_check_only"]
|
|
21657
21663
|
};
|
|
21658
21664
|
const selfEntry = failing ? undefined : verdicts.findLast((entry) => entry.current && !entry.independent && STRONG_RESULTS.has(String(entry.verdict.result)));
|
|
21659
21665
|
return {
|
|
@@ -21669,7 +21675,7 @@ function checkVerdicts(cwd, branch, rows) {
|
|
|
21669
21675
|
authors: [...authors].toSorted()
|
|
21670
21676
|
};
|
|
21671
21677
|
}
|
|
21672
|
-
var OBSERVED_ONLY = new Set(["check", ...PR_ROW_TYPES]);
|
|
21678
|
+
var OBSERVED_ONLY = new Set(["check", "merge.unverified", ...PR_ROW_TYPES]);
|
|
21673
21679
|
|
|
21674
21680
|
// packages/workit-core/src/core/policy/derive.ts
|
|
21675
21681
|
var RULES = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brainervirus/workit-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Workit shared MCP transport for the eight task and policy operation families",
|
|
6
6
|
"keywords": [
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"build": "bun scripts/build.ts"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@brainervirus/workit-core": "^
|
|
45
|
+
"@brainervirus/workit-core": "^8.0.1",
|
|
46
46
|
"@modelcontextprotocol/sdk": "1.32.0",
|
|
47
47
|
"zod": "4.6.5"
|
|
48
48
|
},
|