nexus-agents 8.126.9 → 8.126.11
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/{chunk-VVGM24B2.js → chunk-3MPOWY7G.js} +2 -2
- package/dist/{chunk-KCB2YLPC.js → chunk-4XEOJW4R.js} +75 -29
- package/dist/{chunk-KCB2YLPC.js.map → chunk-4XEOJW4R.js.map} +1 -1
- package/dist/{chunk-RDOZK54J.js → chunk-EHFQLQYS.js} +3 -4
- package/dist/chunk-EHFQLQYS.js.map +1 -0
- package/dist/{chunk-6JXE4CXO.js → chunk-EVSKQI4B.js} +14 -17
- package/dist/{chunk-6JXE4CXO.js.map → chunk-EVSKQI4B.js.map} +1 -1
- package/dist/{chunk-I3XUIBUI.js → chunk-N4GU3UQA.js} +7 -7
- package/dist/chunk-N4GU3UQA.js.map +1 -0
- package/dist/{chunk-T2DGOM7R.js → chunk-OTQKPLRU.js} +2 -2
- package/dist/{chunk-T2DGOM7R.js.map → chunk-OTQKPLRU.js.map} +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-JBJDDO4W.js → consensus-vote-HE44XQ7I.js} +4 -4
- package/dist/{consensus-vote-types-CXZHVE1M.d.ts → consensus-vote-types-CKdKL6FP.d.ts} +2 -0
- package/dist/{improvement-review-LX7F2LZL.js → improvement-review-D3COUC2O.js} +4 -4
- package/dist/index.d.ts +30 -30
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-HKN4HYYY.js → setup-data-dir-UC2E5BN3.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-I3XUIBUI.js.map +0 -1
- package/dist/chunk-RDOZK54J.js.map +0 -1
- /package/dist/{chunk-VVGM24B2.js.map → chunk-3MPOWY7G.js.map} +0 -0
- /package/dist/{consensus-vote-JBJDDO4W.js.map → consensus-vote-HE44XQ7I.js.map} +0 -0
- /package/dist/{improvement-review-LX7F2LZL.js.map → improvement-review-D3COUC2O.js.map} +0 -0
- /package/dist/{setup-data-dir-HKN4HYYY.js.map → setup-data-dir-UC2E5BN3.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toolStructuredError,
|
|
8
8
|
toolSuccessStructured,
|
|
9
9
|
wrapToolWithTimeout
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EVSKQI4B.js";
|
|
11
11
|
import {
|
|
12
12
|
JsonlStore,
|
|
13
13
|
SECURITY_KEYWORDS,
|
|
@@ -2428,4 +2428,4 @@ export {
|
|
|
2428
2428
|
runImprovementReview,
|
|
2429
2429
|
registerImprovementReviewTool
|
|
2430
2430
|
};
|
|
2431
|
-
//# sourceMappingURL=chunk-
|
|
2431
|
+
//# sourceMappingURL=chunk-3MPOWY7G.js.map
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-UVQIYBDK.js";
|
|
10
10
|
import {
|
|
11
11
|
withPrerequisite
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3MPOWY7G.js";
|
|
13
13
|
import {
|
|
14
14
|
generateSecurityPlan
|
|
15
15
|
} from "./chunk-MBQ7YDWZ.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
import {
|
|
42
42
|
DEFAULT_TASK_TTL_MS,
|
|
43
43
|
clampTaskTtl
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-EHFQLQYS.js";
|
|
45
45
|
import {
|
|
46
46
|
executeExpert
|
|
47
47
|
} from "./chunk-SRLSTOJL.js";
|
|
@@ -96,7 +96,7 @@ import {
|
|
|
96
96
|
withFileLock,
|
|
97
97
|
withWarnings,
|
|
98
98
|
writeJobCancelled
|
|
99
|
-
} from "./chunk-
|
|
99
|
+
} from "./chunk-N4GU3UQA.js";
|
|
100
100
|
import {
|
|
101
101
|
NOOP_NOTIFIER,
|
|
102
102
|
RateLimiter,
|
|
@@ -122,12 +122,12 @@ import {
|
|
|
122
122
|
toolSuccessStructured,
|
|
123
123
|
withProgressHeartbeat,
|
|
124
124
|
wrapToolWithTimeout
|
|
125
|
-
} from "./chunk-
|
|
125
|
+
} from "./chunk-EVSKQI4B.js";
|
|
126
126
|
import {
|
|
127
127
|
VERSION,
|
|
128
128
|
createRequestContext,
|
|
129
129
|
measuredTrustTier
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-OTQKPLRU.js";
|
|
131
131
|
import {
|
|
132
132
|
allOf,
|
|
133
133
|
anyOf
|
|
@@ -47060,7 +47060,7 @@ function buildVotingInput(plan, config) {
|
|
|
47060
47060
|
}
|
|
47061
47061
|
async function executeSingleVote(plan, config, log) {
|
|
47062
47062
|
try {
|
|
47063
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47063
|
+
const { executeVoting } = await import("./consensus-vote-HE44XQ7I.js");
|
|
47064
47064
|
const input = buildVotingInput(plan, config);
|
|
47065
47065
|
const result = await executeVoting(input, log);
|
|
47066
47066
|
return parseVotingResult(result);
|
|
@@ -48207,7 +48207,7 @@ function createVoteStage({ config, startStage }) {
|
|
|
48207
48207
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
48208
48208
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
48209
48209
|
try {
|
|
48210
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
48210
|
+
const { executeVoting } = await import("./consensus-vote-HE44XQ7I.js");
|
|
48211
48211
|
const proposal = buildVoteProposal(plan, research);
|
|
48212
48212
|
const votingResult = await executeVoting(
|
|
48213
48213
|
{
|
|
@@ -49867,6 +49867,18 @@ function createAuditStageRegistry() {
|
|
|
49867
49867
|
// src/mcp/tools/pr-review-findings.ts
|
|
49868
49868
|
import { posix } from "node:path";
|
|
49869
49869
|
import { parse as parseYaml3 } from "yaml";
|
|
49870
|
+
var FINDING_SEVERITY_ORDER = {
|
|
49871
|
+
info: 0,
|
|
49872
|
+
low: 1,
|
|
49873
|
+
medium: 2,
|
|
49874
|
+
high: 3,
|
|
49875
|
+
critical: 4
|
|
49876
|
+
};
|
|
49877
|
+
var BLOCKING_SEVERITY_FLOOR = "medium";
|
|
49878
|
+
function isBlockingSeverity(severity, role) {
|
|
49879
|
+
if (role === "security") return true;
|
|
49880
|
+
return FINDING_SEVERITY_ORDER[coerceSeverity(severity)] >= FINDING_SEVERITY_ORDER[BLOCKING_SEVERITY_FLOOR];
|
|
49881
|
+
}
|
|
49870
49882
|
function findingsAgree(left, right, leftRole, rightRole, repoPath) {
|
|
49871
49883
|
if (leftRole === rightRole || !left.verified || !right.verified) return false;
|
|
49872
49884
|
const a = normalizeFindingLocation(left.location, repoPath);
|
|
@@ -49904,11 +49916,17 @@ function isFindingVerified(gate) {
|
|
|
49904
49916
|
if (/^(passed|ok|yes|done|verified)$/i.test(gate.named_assertion.trim())) return false;
|
|
49905
49917
|
return true;
|
|
49906
49918
|
}
|
|
49907
|
-
var
|
|
49919
|
+
var FINDINGS_OPEN = "```yaml findings\n";
|
|
49920
|
+
var FINDINGS_CLOSE = "\n```";
|
|
49921
|
+
function extractFindingsBlock(reasoning) {
|
|
49922
|
+
const open2 = reasoning.indexOf(FINDINGS_OPEN);
|
|
49923
|
+
if (open2 === -1) return void 0;
|
|
49924
|
+
const start = open2 + FINDINGS_OPEN.length;
|
|
49925
|
+
const close = reasoning.indexOf(FINDINGS_CLOSE, start);
|
|
49926
|
+
return close === -1 ? void 0 : reasoning.slice(start, close);
|
|
49927
|
+
}
|
|
49908
49928
|
function parseFindings(reasoning) {
|
|
49909
|
-
const
|
|
49910
|
-
if (match === null) return [];
|
|
49911
|
-
const yamlBody = match[1];
|
|
49929
|
+
const yamlBody = extractFindingsBlock(reasoning);
|
|
49912
49930
|
if (yamlBody === void 0 || yamlBody.trim() === "") return [];
|
|
49913
49931
|
let parsed;
|
|
49914
49932
|
try {
|
|
@@ -49955,7 +49973,8 @@ function coerceGateCheck(raw) {
|
|
|
49955
49973
|
return "skipped";
|
|
49956
49974
|
}
|
|
49957
49975
|
function coerceSeverity(raw) {
|
|
49958
|
-
if (raw === "critical" || raw === "high" || raw === "medium" || raw === "low"
|
|
49976
|
+
if (raw === "critical" || raw === "high" || raw === "medium" || raw === "low" || raw === "info")
|
|
49977
|
+
return raw;
|
|
49959
49978
|
return "medium";
|
|
49960
49979
|
}
|
|
49961
49980
|
var FINDINGS_FORMAT_INSTRUCTIONS = `If you have one or more findings (claims that justify request_changes), emit them in a fenced YAML block at the END of your reasoning, exactly as below. If you're approving, OMIT the block entirely.
|
|
@@ -49963,7 +49982,7 @@ var FINDINGS_FORMAT_INSTRUCTIONS = `If you have one or more findings (claims tha
|
|
|
49963
49982
|
\`\`\`yaml findings
|
|
49964
49983
|
- summary: 'One-line summary of the issue'
|
|
49965
49984
|
location: path/file.ext:LINE
|
|
49966
|
-
severity: critical | high | medium | low
|
|
49985
|
+
severity: critical | high | medium | low | info
|
|
49967
49986
|
gate:
|
|
49968
49987
|
reread_cited_line: passed
|
|
49969
49988
|
traced_call_path: passed
|
|
@@ -49972,7 +49991,7 @@ var FINDINGS_FORMAT_INSTRUCTIONS = `If you have one or more findings (claims tha
|
|
|
49972
49991
|
claim: 'What is wrong and why it justifies blocking the merge.'
|
|
49973
49992
|
\`\`\`
|
|
49974
49993
|
|
|
49975
|
-
A finding only triggers
|
|
49994
|
+
A finding only triggers the verified-finding tier if its severity is ${BLOCKING_SEVERITY_FLOOR} or higher, ALL FOUR gate checks are 'passed' AND named_assertion is substantive (>10 chars, naming a concrete failure). Non-security low/info findings are reported but do not corroborate a verified blocker. Security-role findings are treated as at least medium. Request_changes votes still count toward soft blocking regardless of severity. Missing/unknown severity in legacy YAML defaults to medium (fail closed); structured JSON rejects unknown severity. Findings missing any gate checks surface as informational only \u2014 they do not verify a blocker on their own. This is the #2225 verification gate; the 2026-04-25 audit found a 100% false-positive rate when this gate was not enforced.`;
|
|
49976
49995
|
|
|
49977
49996
|
// src/mcp/tools/pr-review-proposal.ts
|
|
49978
49997
|
function sanitizationNote(sanitizeResult, removedBefore) {
|
|
@@ -50681,33 +50700,34 @@ function mapVoteDecisionToPrDecision(voteDecision) {
|
|
|
50681
50700
|
var SOFT_BLOCK_REQUEST_CHANGES_THRESHOLD = 3;
|
|
50682
50701
|
function aggregatePrDecisions(reviews, errorPolicy = "standard", repoPath) {
|
|
50683
50702
|
const valid = reviews.filter((r) => !isAbsentSeat(r));
|
|
50684
|
-
const
|
|
50685
|
-
const incompleteReason = `incomplete panel: ${String(valid.length)} of ${String(reviews.length)} voters responded`;
|
|
50686
|
-
const panelVerdict = (decision) => complete() ? { decision, verified: true } : { decision, verified: false, reason: incompleteReason };
|
|
50703
|
+
const panelVerdict = (decision) => aggregatePanelVerdict(reviews, valid, decision);
|
|
50687
50704
|
if (valid.length === 0) return panelVerdict("abstain");
|
|
50688
50705
|
const findingBlocker = aggregateBlockingFindings(valid, repoPath);
|
|
50689
|
-
if (findingBlocker !== void 0) return findingBlocker;
|
|
50706
|
+
if (findingBlocker !== void 0) return discloseSeverityFloor(findingBlocker, valid);
|
|
50690
50707
|
const requestChangesVoters = valid.filter((r) => r.decision === "request_changes").length;
|
|
50691
50708
|
if (requestChangesVoters >= SOFT_BLOCK_REQUEST_CHANGES_THRESHOLD) {
|
|
50692
|
-
return { decision: "request_changes", verified: false };
|
|
50709
|
+
return discloseSeverityFloor({ decision: "request_changes", verified: false }, valid);
|
|
50693
50710
|
}
|
|
50694
50711
|
if (valid.every((r) => r.decision === "approve")) {
|
|
50695
50712
|
if (errorPolicy === "absolute_quorum") {
|
|
50696
|
-
return absoluteQuorumApprove(reviews, valid);
|
|
50713
|
+
return discloseSeverityFloor(absoluteQuorumApprove(reviews, valid), valid);
|
|
50697
50714
|
}
|
|
50698
50715
|
if (valid.length < 2)
|
|
50699
|
-
return
|
|
50700
|
-
|
|
50701
|
-
|
|
50702
|
-
|
|
50703
|
-
|
|
50716
|
+
return discloseSeverityFloor(
|
|
50717
|
+
{
|
|
50718
|
+
decision: "abstain",
|
|
50719
|
+
verified: false,
|
|
50720
|
+
reason: "insufficient reviewers: 1 reviewer; needs second reviewer"
|
|
50721
|
+
},
|
|
50722
|
+
valid
|
|
50723
|
+
);
|
|
50704
50724
|
return panelVerdict("approve");
|
|
50705
50725
|
}
|
|
50706
50726
|
return panelVerdict("abstain");
|
|
50707
50727
|
}
|
|
50708
50728
|
function resolveAggregate(reviews, input, absent, coverage, logger58) {
|
|
50709
50729
|
const preGate = aggregatePrDecisions(reviews, input.errorPolicy, input.repoPath);
|
|
50710
|
-
if (preGate.reason !== void 0) {
|
|
50730
|
+
if (!preGate.verified && preGate.reason !== void 0) {
|
|
50711
50731
|
logger58.warn("pr_review aggregate is unverified", {
|
|
50712
50732
|
reason: preGate.reason,
|
|
50713
50733
|
absentCount: absent.errorCount + absent.unverifiableCount,
|
|
@@ -50722,7 +50742,10 @@ function resolveAggregate(reviews, input, absent, coverage, logger58) {
|
|
|
50722
50742
|
{ reason: aggregate.reason }
|
|
50723
50743
|
);
|
|
50724
50744
|
}
|
|
50725
|
-
return aggregate
|
|
50745
|
+
return aggregate === preGate ? aggregate : discloseSeverityFloor(
|
|
50746
|
+
aggregate,
|
|
50747
|
+
reviews.filter((r) => !isAbsentSeat(r))
|
|
50748
|
+
);
|
|
50726
50749
|
}
|
|
50727
50750
|
function rollUpDecisionCost(voteResults, logger58, jobId) {
|
|
50728
50751
|
try {
|
|
@@ -50937,7 +50960,7 @@ function describeUnconfirmedFindings(reviewers) {
|
|
|
50937
50960
|
}
|
|
50938
50961
|
function aggregateBlockingFindings(valid, repoPath) {
|
|
50939
50962
|
const blockers = valid.filter((r) => r.decision === "request_changes").flatMap(
|
|
50940
|
-
(r) => r.findings.filter((f) => f.verified).map((finding) => ({ role: r.role, finding }))
|
|
50963
|
+
(r) => r.findings.filter((f) => f.verified && isBlockingSeverity(f.severity, r.role)).map((finding) => ({ role: r.role, finding }))
|
|
50941
50964
|
);
|
|
50942
50965
|
const first = blockers[0];
|
|
50943
50966
|
if (first === void 0) return void 0;
|
|
@@ -50958,6 +50981,29 @@ function aggregateBlockingFindings(valid, repoPath) {
|
|
|
50958
50981
|
reason: describeUnconfirmedFindings([...reviewers.values()])
|
|
50959
50982
|
};
|
|
50960
50983
|
}
|
|
50984
|
+
function discloseSeverityFloor(aggregate, valid) {
|
|
50985
|
+
const findings = valid.filter((r) => r.decision === "request_changes").flatMap((r) => r.findings.filter((f) => !isBlockingSeverity(f.severity, r.role)));
|
|
50986
|
+
const count = findings.length;
|
|
50987
|
+
if (count === 0) return aggregate;
|
|
50988
|
+
const verifiedCount = findings.filter((f) => f.verified).length;
|
|
50989
|
+
const unverifiedCount = count - verifiedCount;
|
|
50990
|
+
const disclosure = `${String(count)} low/info ${count === 1 ? "finding" : "findings"} from request_changes voters below the blocking floor (${BLOCKING_SEVERITY_FLOOR}): ${String(verifiedCount)} verified, ${String(unverifiedCount)} unverified`;
|
|
50991
|
+
return {
|
|
50992
|
+
...aggregate,
|
|
50993
|
+
reason: aggregate.reason === void 0 ? disclosure : `${aggregate.reason}; ${disclosure}`
|
|
50994
|
+
};
|
|
50995
|
+
}
|
|
50996
|
+
function aggregatePanelVerdict(reviews, valid, decision) {
|
|
50997
|
+
const complete = valid.length === reviews.length;
|
|
50998
|
+
return discloseSeverityFloor(
|
|
50999
|
+
complete ? { decision, verified: true } : {
|
|
51000
|
+
decision,
|
|
51001
|
+
verified: false,
|
|
51002
|
+
reason: `incomplete panel: ${String(valid.length)} of ${String(reviews.length)} voters responded`
|
|
51003
|
+
},
|
|
51004
|
+
valid
|
|
51005
|
+
);
|
|
51006
|
+
}
|
|
50961
51007
|
function absoluteQuorumApprove(reviews, valid) {
|
|
50962
51008
|
const errorCount = reviews.length - valid.length;
|
|
50963
51009
|
const erroredRoles = reviews.filter(isAbsentSeat).map((r) => r.role);
|
|
@@ -57845,4 +57891,4 @@ export {
|
|
|
57845
57891
|
initializeSandbox,
|
|
57846
57892
|
getSandboxMode
|
|
57847
57893
|
};
|
|
57848
|
-
//# sourceMappingURL=chunk-
|
|
57894
|
+
//# sourceMappingURL=chunk-4XEOJW4R.js.map
|