nexus-agents 8.3.0 → 8.3.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/{chunk-R5F7Y5UY.js → chunk-3OU7XMEP.js} +2 -2
- package/dist/{chunk-K5GYF2LP.js → chunk-3RMLDTUF.js} +3 -3
- package/dist/{chunk-LY2FJKYX.js → chunk-44I4XVRU.js} +2 -2
- package/dist/{chunk-PDROJ5FZ.js → chunk-JGBXLELL.js} +2 -2
- package/dist/chunk-LZBARHPR.js +7 -0
- package/dist/{chunk-S7UZUGS7.js → chunk-ONSYYUB4.js} +107 -93
- package/dist/chunk-ONSYYUB4.js.map +1 -0
- package/dist/{chunk-ULQFMQE7.js → chunk-PGUZPMT4.js} +10 -4
- package/dist/{chunk-ULQFMQE7.js.map → chunk-PGUZPMT4.js.map} +1 -1
- package/dist/{chunk-UPEBXNNC.js → chunk-PSAXQXL5.js} +2 -2
- package/dist/{chunk-L2BM3TGM.js → chunk-VULYVX6X.js} +24 -9
- package/dist/chunk-VULYVX6X.js.map +1 -0
- package/dist/cli.js +11 -11
- package/dist/{consensus-vote-ZDBL2EA4.js → consensus-vote-H67IAMI2.js} +4 -4
- package/dist/{improvement-review-ZTF544Y7.js → improvement-review-UECHDBER.js} +4 -4
- package/dist/index.d.ts +45 -25
- package/dist/index.js +21 -10
- package/dist/index.js.map +1 -1
- package/dist/{issue-triage-MGYUQ7WN.js → issue-triage-6W5G6LC6.js} +3 -3
- package/dist/{pr-reviewer-helpers-74SUOXOV.js → pr-reviewer-helpers-NRVB6RVY.js} +3 -3
- package/dist/{setup-data-dir-GQ4QQKHZ.js → setup-data-dir-HJCC6U4N.js} +3 -3
- package/package.json +2 -2
- package/dist/chunk-7IDMD4IN.js +0 -7
- package/dist/chunk-L2BM3TGM.js.map +0 -1
- package/dist/chunk-S7UZUGS7.js.map +0 -1
- /package/dist/{chunk-R5F7Y5UY.js.map → chunk-3OU7XMEP.js.map} +0 -0
- /package/dist/{chunk-K5GYF2LP.js.map → chunk-3RMLDTUF.js.map} +0 -0
- /package/dist/{chunk-LY2FJKYX.js.map → chunk-44I4XVRU.js.map} +0 -0
- /package/dist/{chunk-PDROJ5FZ.js.map → chunk-JGBXLELL.js.map} +0 -0
- /package/dist/{chunk-7IDMD4IN.js.map → chunk-LZBARHPR.js.map} +0 -0
- /package/dist/{chunk-UPEBXNNC.js.map → chunk-PSAXQXL5.js.map} +0 -0
- /package/dist/{consensus-vote-ZDBL2EA4.js.map → consensus-vote-H67IAMI2.js.map} +0 -0
- /package/dist/{improvement-review-ZTF544Y7.js.map → improvement-review-UECHDBER.js.map} +0 -0
- /package/dist/{issue-triage-MGYUQ7WN.js.map → issue-triage-6W5G6LC6.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-74SUOXOV.js.map → pr-reviewer-helpers-NRVB6RVY.js.map} +0 -0
- /package/dist/{setup-data-dir-GQ4QQKHZ.js.map → setup-data-dir-HJCC6U4N.js.map} +0 -0
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
toolStructuredError,
|
|
8
8
|
toolSuccessStructured,
|
|
9
9
|
wrapToolWithTimeout
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VULYVX6X.js";
|
|
11
11
|
import {
|
|
12
12
|
JsonlStore,
|
|
13
13
|
SECURITY_KEYWORDS,
|
|
@@ -2159,4 +2159,4 @@ export {
|
|
|
2159
2159
|
runImprovementReview,
|
|
2160
2160
|
registerImprovementReviewTool
|
|
2161
2161
|
};
|
|
2162
|
-
//# sourceMappingURL=chunk-
|
|
2162
|
+
//# sourceMappingURL=chunk-3OU7XMEP.js.map
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "./chunk-OQB3XC5O.js";
|
|
7
7
|
import {
|
|
8
8
|
VERSION
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LZBARHPR.js";
|
|
10
10
|
import {
|
|
11
11
|
capitalize
|
|
12
12
|
} from "./chunk-6T3EPABN.js";
|
|
@@ -1201,7 +1201,7 @@ async function runDoctorFix(result) {
|
|
|
1201
1201
|
writeLine2("\u2500".repeat(40));
|
|
1202
1202
|
let fixCount = 0;
|
|
1203
1203
|
if (!result.dataDirectory.rootExists || result.dataDirectory.subdirectories.some((d) => !d.exists || !d.writable)) {
|
|
1204
|
-
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-
|
|
1204
|
+
const { initDataDirectories: initDataDirectories2, describeDataDirFix: describeDataDirFix2 } = await import("./setup-data-dir-HJCC6U4N.js");
|
|
1205
1205
|
const outcome = describeDataDirFix2(initDataDirectories2());
|
|
1206
1206
|
writeLine2(outcome.line);
|
|
1207
1207
|
if (outcome.counted) fixCount++;
|
|
@@ -1303,4 +1303,4 @@ export {
|
|
|
1303
1303
|
startStdioServer,
|
|
1304
1304
|
closeServer
|
|
1305
1305
|
};
|
|
1306
|
-
//# sourceMappingURL=chunk-
|
|
1306
|
+
//# sourceMappingURL=chunk-3RMLDTUF.js.map
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VULYVX6X.js";
|
|
27
27
|
import {
|
|
28
28
|
assessPanelIndependence,
|
|
29
29
|
countDistinctModels,
|
|
@@ -6892,4 +6892,4 @@ export {
|
|
|
6892
6892
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
6893
6893
|
registerConsensusVoteTool
|
|
6894
6894
|
};
|
|
6895
|
-
//# sourceMappingURL=chunk-
|
|
6895
|
+
//# sourceMappingURL=chunk-44I4XVRU.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
gateWithReputation,
|
|
12
12
|
resolveReputationGatingMode,
|
|
13
13
|
sanitizeInput
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-PGUZPMT4.js";
|
|
15
15
|
import {
|
|
16
16
|
emitPolicyEvent
|
|
17
17
|
} from "./chunk-U5YJKJK2.js";
|
|
@@ -1247,4 +1247,4 @@ export {
|
|
|
1247
1247
|
IssueTriage,
|
|
1248
1248
|
createIssueTriage
|
|
1249
1249
|
};
|
|
1250
|
-
//# sourceMappingURL=chunk-
|
|
1250
|
+
//# sourceMappingURL=chunk-JGBXLELL.js.map
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
clampTaskTtl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3RMLDTUF.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
27
|
} from "./chunk-CCRTVIXF.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
simulationDeniedResult,
|
|
48
48
|
toJobSummary,
|
|
49
49
|
writeJobCancelled
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-44I4XVRU.js";
|
|
51
51
|
import {
|
|
52
52
|
allOf
|
|
53
53
|
} from "./chunk-OQB3XC5O.js";
|
|
@@ -57,14 +57,14 @@ import {
|
|
|
57
57
|
} from "./chunk-2XXKUAQS.js";
|
|
58
58
|
import {
|
|
59
59
|
IssueTriage
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-JGBXLELL.js";
|
|
61
61
|
import {
|
|
62
62
|
resolveEnvMode,
|
|
63
63
|
sanitizeInput
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-PGUZPMT4.js";
|
|
65
65
|
import {
|
|
66
66
|
withPrerequisite
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-3OU7XMEP.js";
|
|
68
68
|
import {
|
|
69
69
|
NOOP_NOTIFIER,
|
|
70
70
|
RateLimiter,
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
withAuditTrail,
|
|
90
90
|
withProgressHeartbeat,
|
|
91
91
|
wrapToolWithTimeout
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-VULYVX6X.js";
|
|
93
93
|
import {
|
|
94
94
|
createAuditTrail,
|
|
95
95
|
createGraphAuditBridge,
|
|
@@ -45577,7 +45577,7 @@ async function tryIssueTriage(task) {
|
|
|
45577
45577
|
try {
|
|
45578
45578
|
const issueMatch = task.match(/github\.com\/([^/]+\/[^/]+)\/issues\/(\d+)/);
|
|
45579
45579
|
if (issueMatch === null) return null;
|
|
45580
|
-
const { createIssueTriage } = await import("./issue-triage-
|
|
45580
|
+
const { createIssueTriage } = await import("./issue-triage-6W5G6LC6.js");
|
|
45581
45581
|
const triage = createIssueTriage();
|
|
45582
45582
|
const owner = issueMatch[1] ?? "";
|
|
45583
45583
|
const num = issueMatch[2] ?? "";
|
|
@@ -47529,7 +47529,7 @@ ${contextBlock}`;
|
|
|
47529
47529
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
47530
47530
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
47531
47531
|
try {
|
|
47532
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47532
|
+
const { executeVoting } = await import("./consensus-vote-H67IAMI2.js");
|
|
47533
47533
|
const votingResult = await executeVoting(
|
|
47534
47534
|
{
|
|
47535
47535
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -48068,10 +48068,6 @@ function createAuditStageRegistry() {
|
|
|
48068
48068
|
]);
|
|
48069
48069
|
}
|
|
48070
48070
|
|
|
48071
|
-
// src/mcp/tools/pr-review-tool.ts
|
|
48072
|
-
import { z as z102 } from "zod";
|
|
48073
|
-
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
48074
|
-
|
|
48075
48071
|
// src/mcp/tools/pr-review-findings.ts
|
|
48076
48072
|
import { parse as parseYaml3 } from "yaml";
|
|
48077
48073
|
function isFindingVerified(gate) {
|
|
@@ -48152,6 +48148,73 @@ var FINDINGS_FORMAT_INSTRUCTIONS = `If you have one or more findings (claims tha
|
|
|
48152
48148
|
|
|
48153
48149
|
A finding only triggers request_changes if ALL FOUR gate checks are 'passed' AND named_assertion is substantive (>10 chars, naming a concrete failure). Findings missing any of those surface as informational only \u2014 they do not block the merge. This is the #2225 verification gate; the 2026-04-25 audit found a 100% false-positive rate when this gate was not enforced.`;
|
|
48154
48150
|
|
|
48151
|
+
// src/mcp/tools/pr-review-proposal.ts
|
|
48152
|
+
function buildPrReviewProposal(input, removedBeforeThisCall = 0) {
|
|
48153
|
+
const sanitizeResult = sanitizeToolInput({
|
|
48154
|
+
prTitle: input.prTitle,
|
|
48155
|
+
prDescription: input.prDescription,
|
|
48156
|
+
prDiff: input.prDiff,
|
|
48157
|
+
repoContext: input.repoContext
|
|
48158
|
+
});
|
|
48159
|
+
const safe = sanitizeResult.sanitized;
|
|
48160
|
+
const parts = [];
|
|
48161
|
+
parts.push(`# Pull Request Review
|
|
48162
|
+
`);
|
|
48163
|
+
const totalRemoved = sanitizeResult.commentsRemoved + removedBeforeThisCall;
|
|
48164
|
+
if (totalRemoved > 0) {
|
|
48165
|
+
parts.push(
|
|
48166
|
+
`> **Note:** ${String(totalRemoved)} HTML comment(s) were removed from the untrusted fields below before you saw them (#5258). Comments are invisible in rendered markdown, so they are stripped rather than trusted. This is routine \u2014 GitHub's default PR template contains one \u2014 and is not by itself evidence of an attack.
|
|
48167
|
+
`
|
|
48168
|
+
);
|
|
48169
|
+
}
|
|
48170
|
+
parts.push(`**Title:** ${safe.prTitle}
|
|
48171
|
+
`);
|
|
48172
|
+
if (input.baseRef !== void 0 && input.headRef !== void 0) {
|
|
48173
|
+
parts.push(`**Branches:** ${input.headRef} \u2192 ${input.baseRef}
|
|
48174
|
+
`);
|
|
48175
|
+
}
|
|
48176
|
+
if (safe.repoContext !== void 0 && safe.repoContext !== "") {
|
|
48177
|
+
parts.push(`
|
|
48178
|
+
**Repo context:**
|
|
48179
|
+
${safe.repoContext}
|
|
48180
|
+
`);
|
|
48181
|
+
}
|
|
48182
|
+
if (safe.prDescription !== void 0 && safe.prDescription !== "") {
|
|
48183
|
+
parts.push(`
|
|
48184
|
+
**Description:**
|
|
48185
|
+
${safe.prDescription}
|
|
48186
|
+
`);
|
|
48187
|
+
}
|
|
48188
|
+
parts.push(`
|
|
48189
|
+
## Diff
|
|
48190
|
+
|
|
48191
|
+
\`\`\`diff
|
|
48192
|
+
${safe.prDiff}
|
|
48193
|
+
\`\`\`
|
|
48194
|
+
`);
|
|
48195
|
+
parts.push(`
|
|
48196
|
+
## Your task
|
|
48197
|
+
`);
|
|
48198
|
+
parts.push(`Review this PR from your role's perspective. Decide: should it be merged as-is?
|
|
48199
|
+
`);
|
|
48200
|
+
parts.push(`- **APPROVE** if the diff is correct, complete, and aligned with your role.
|
|
48201
|
+
`);
|
|
48202
|
+
parts.push(
|
|
48203
|
+
`- **REJECT** (= "request changes") if there is at least one concrete defect, missing requirement, or violation that justifies blocking the merge.
|
|
48204
|
+
`
|
|
48205
|
+
);
|
|
48206
|
+
parts.push(`- **ABSTAIN** if the diff is outside your role's concerns.
|
|
48207
|
+
`);
|
|
48208
|
+
parts.push(`
|
|
48209
|
+
${FINDINGS_FORMAT_INSTRUCTIONS}
|
|
48210
|
+
`);
|
|
48211
|
+
return parts.join("");
|
|
48212
|
+
}
|
|
48213
|
+
|
|
48214
|
+
// src/mcp/tools/pr-review-tool.ts
|
|
48215
|
+
import { z as z102 } from "zod";
|
|
48216
|
+
import { randomUUID as randomUUID13 } from "node:crypto";
|
|
48217
|
+
|
|
48155
48218
|
// src/audit/reviewed-diff-hash.ts
|
|
48156
48219
|
import * as crypto2 from "node:crypto";
|
|
48157
48220
|
var MAX_REVIEWED_DIFF_BYTES = 5e4;
|
|
@@ -48833,66 +48896,6 @@ function absoluteQuorumApprove(reviews, valid) {
|
|
|
48833
48896
|
}
|
|
48834
48897
|
return { decision: "approve", verified: true };
|
|
48835
48898
|
}
|
|
48836
|
-
function buildPrReviewProposal(input) {
|
|
48837
|
-
const sanitizeResult = sanitizeToolInput({
|
|
48838
|
-
prTitle: input.prTitle,
|
|
48839
|
-
prDescription: input.prDescription,
|
|
48840
|
-
prDiff: input.prDiff,
|
|
48841
|
-
repoContext: input.repoContext
|
|
48842
|
-
});
|
|
48843
|
-
const safe = sanitizeResult.sanitized;
|
|
48844
|
-
const parts = [];
|
|
48845
|
-
parts.push(`# Pull Request Review
|
|
48846
|
-
`);
|
|
48847
|
-
if (sanitizeResult.commentsRemoved > 0) {
|
|
48848
|
-
parts.push(
|
|
48849
|
-
`> **Note:** ${String(sanitizeResult.commentsRemoved)} HTML comment(s) were removed from the untrusted fields below before you saw them (#5258). Comments are invisible in rendered markdown, so they are stripped rather than trusted. This is routine \u2014 GitHub's default PR template contains one \u2014 and is not by itself evidence of an attack.
|
|
48850
|
-
`
|
|
48851
|
-
);
|
|
48852
|
-
}
|
|
48853
|
-
parts.push(`**Title:** ${safe.prTitle}
|
|
48854
|
-
`);
|
|
48855
|
-
if (input.baseRef !== void 0 && input.headRef !== void 0) {
|
|
48856
|
-
parts.push(`**Branches:** ${input.headRef} \u2192 ${input.baseRef}
|
|
48857
|
-
`);
|
|
48858
|
-
}
|
|
48859
|
-
if (safe.repoContext !== void 0 && safe.repoContext !== "") {
|
|
48860
|
-
parts.push(`
|
|
48861
|
-
**Repo context:**
|
|
48862
|
-
${safe.repoContext}
|
|
48863
|
-
`);
|
|
48864
|
-
}
|
|
48865
|
-
if (safe.prDescription !== void 0 && safe.prDescription !== "") {
|
|
48866
|
-
parts.push(`
|
|
48867
|
-
**Description:**
|
|
48868
|
-
${safe.prDescription}
|
|
48869
|
-
`);
|
|
48870
|
-
}
|
|
48871
|
-
parts.push(`
|
|
48872
|
-
## Diff
|
|
48873
|
-
|
|
48874
|
-
\`\`\`diff
|
|
48875
|
-
${safe.prDiff}
|
|
48876
|
-
\`\`\`
|
|
48877
|
-
`);
|
|
48878
|
-
parts.push(`
|
|
48879
|
-
## Your task
|
|
48880
|
-
`);
|
|
48881
|
-
parts.push(`Review this PR from your role's perspective. Decide: should it be merged as-is?
|
|
48882
|
-
`);
|
|
48883
|
-
parts.push(`- **APPROVE** if the diff is correct, complete, and aligned with your role.
|
|
48884
|
-
`);
|
|
48885
|
-
parts.push(
|
|
48886
|
-
`- **REJECT** (= "request changes") if there is at least one concrete defect, missing requirement, or violation that justifies blocking the merge.
|
|
48887
|
-
`
|
|
48888
|
-
);
|
|
48889
|
-
parts.push(`- **ABSTAIN** if the diff is outside your role's concerns.
|
|
48890
|
-
`);
|
|
48891
|
-
parts.push(`
|
|
48892
|
-
${FINDINGS_FORMAT_INSTRUCTIONS}
|
|
48893
|
-
`);
|
|
48894
|
-
return parts.join("");
|
|
48895
|
-
}
|
|
48896
48899
|
function resolveAggregate(reviews, input, errorCount, coverage, logger58) {
|
|
48897
48900
|
const preGate = aggregatePrDecisions(reviews, input.errorPolicy);
|
|
48898
48901
|
if (preGate.reason !== void 0) {
|
|
@@ -48910,7 +48913,7 @@ function resolveAggregate(reviews, input, errorCount, coverage, logger58) {
|
|
|
48910
48913
|
}
|
|
48911
48914
|
return aggregate;
|
|
48912
48915
|
}
|
|
48913
|
-
function preparePanelProposal(input, logger58) {
|
|
48916
|
+
function preparePanelProposal(input, logger58, removedBeforeThisCall = 0) {
|
|
48914
48917
|
const { coverage, packedDiff, note } = packDiffForReview(input.prDiff, MAX_DIFF_LENGTH);
|
|
48915
48918
|
const body = coverage === void 0 ? input : { ...input, prDiff: packedDiff };
|
|
48916
48919
|
if (coverage?.partial === true) {
|
|
@@ -48918,24 +48921,11 @@ function preparePanelProposal(input, logger58) {
|
|
|
48918
48921
|
`pr_review diff over budget \u2014 reviewed ${String(coverage.reviewedFiles)} of ${String(coverage.totalFiles)} files, dropped ${String(coverage.droppedFiles.length)}`
|
|
48919
48922
|
);
|
|
48920
48923
|
}
|
|
48921
|
-
return { proposal: note + buildPrReviewProposal(body), coverage };
|
|
48924
|
+
return { proposal: note + buildPrReviewProposal(body, removedBeforeThisCall), coverage };
|
|
48922
48925
|
}
|
|
48923
|
-
|
|
48924
|
-
const start = Date.now();
|
|
48925
|
-
const { proposal, coverage } = preparePanelProposal(input, logger58);
|
|
48926
|
-
const voteResults = await collectRealVotes({
|
|
48927
|
-
roles: PR_REVIEW_ROLES,
|
|
48928
|
-
proposal,
|
|
48929
|
-
simulate: input.simulate,
|
|
48930
|
-
logger: logger58,
|
|
48931
|
-
...gatewayAdapters !== void 0 && { gatewayAdapters }
|
|
48932
|
-
});
|
|
48933
|
-
const reviews = voteResults.map(toPrReviewVote);
|
|
48934
|
-
const counts = summarizeReviews(reviews);
|
|
48935
|
-
const aggregate = resolveAggregate(reviews, input, counts.errorCount, coverage, logger58);
|
|
48936
|
-
let costSummary;
|
|
48926
|
+
function rollUpDecisionCost(voteResults, logger58) {
|
|
48937
48927
|
try {
|
|
48938
|
-
|
|
48928
|
+
return recordDecisionCost({
|
|
48939
48929
|
decisionId: `pr-${randomUUID13().slice(0, 8)}`,
|
|
48940
48930
|
gate: "pr_review",
|
|
48941
48931
|
votes: voteResults
|
|
@@ -48944,7 +48934,24 @@ async function executePrReviewBody(input, logger58, gatewayAdapters) {
|
|
|
48944
48934
|
logger58.warn("Per-decision cost rollup failed (non-fatal)", {
|
|
48945
48935
|
error: getErrorMessage(costError)
|
|
48946
48936
|
});
|
|
48937
|
+
return void 0;
|
|
48947
48938
|
}
|
|
48939
|
+
}
|
|
48940
|
+
async function executePrReviewBody(input, logger58, opts = {}) {
|
|
48941
|
+
const start = Date.now();
|
|
48942
|
+
const { gatewayAdapters: adapters, removedBeforeThisCall: removed = 0 } = opts;
|
|
48943
|
+
const { proposal, coverage } = preparePanelProposal(input, logger58, removed);
|
|
48944
|
+
const voteResults = await collectRealVotes({
|
|
48945
|
+
roles: PR_REVIEW_ROLES,
|
|
48946
|
+
proposal,
|
|
48947
|
+
simulate: input.simulate,
|
|
48948
|
+
logger: logger58,
|
|
48949
|
+
...adapters !== void 0 && { gatewayAdapters: adapters }
|
|
48950
|
+
});
|
|
48951
|
+
const reviews = voteResults.map(toPrReviewVote);
|
|
48952
|
+
const counts = summarizeReviews(reviews);
|
|
48953
|
+
const aggregate = resolveAggregate(reviews, input, counts.errorCount, coverage, logger58);
|
|
48954
|
+
const costSummary = rollUpDecisionCost(voteResults, logger58);
|
|
48948
48955
|
const recordOutcome3 = persistReviewRecord({
|
|
48949
48956
|
// #4459: `input.prDiff` is opaque MCP input — it passed the unified-diff
|
|
48950
48957
|
// shape gate (#4451), but nothing here establishes it is the PR's real diff.
|
|
@@ -48969,6 +48976,7 @@ async function executePrReviewBody(input, logger58, gatewayAdapters) {
|
|
|
48969
48976
|
return toolSuccess(JSON.stringify(response, null, 2));
|
|
48970
48977
|
}
|
|
48971
48978
|
function makePrReviewHandler(gatewayAdapters) {
|
|
48979
|
+
const adapterOpt = gatewayAdapters !== void 0 ? { gatewayAdapters } : {};
|
|
48972
48980
|
return async function prReviewHandler(args, ctx) {
|
|
48973
48981
|
const parsed = PrReviewInputSchema.safeParse(args);
|
|
48974
48982
|
if (!parsed.success) {
|
|
@@ -48988,11 +48996,17 @@ function makePrReviewHandler(gatewayAdapters) {
|
|
|
48988
48996
|
toolName: "pr_review",
|
|
48989
48997
|
input,
|
|
48990
48998
|
freshJobId: () => `pr-${randomUUID13()}`,
|
|
48991
|
-
run: () => executePrReviewBody(input, ctx.logger,
|
|
48999
|
+
run: () => executePrReviewBody(input, ctx.logger, {
|
|
49000
|
+
...adapterOpt,
|
|
49001
|
+
removedBeforeThisCall: ctx.sanitization.commentsRemoved
|
|
49002
|
+
}),
|
|
48992
49003
|
logger: ctx.logger
|
|
48993
49004
|
});
|
|
48994
49005
|
}
|
|
48995
|
-
return await executePrReviewBody(input, ctx.logger,
|
|
49006
|
+
return await executePrReviewBody(input, ctx.logger, {
|
|
49007
|
+
...adapterOpt,
|
|
49008
|
+
removedBeforeThisCall: ctx.sanitization.commentsRemoved
|
|
49009
|
+
});
|
|
48996
49010
|
} catch (error) {
|
|
48997
49011
|
return toolStructuredError({
|
|
48998
49012
|
errorCategory: "internal",
|
|
@@ -56129,12 +56143,12 @@ export {
|
|
|
56129
56143
|
registerPipelineTool,
|
|
56130
56144
|
registerRunTool,
|
|
56131
56145
|
registerListAvailableModelsTool,
|
|
56146
|
+
buildPrReviewProposal,
|
|
56132
56147
|
PR_REVIEW_ROLES,
|
|
56133
56148
|
MAX_DIFF_LENGTH,
|
|
56134
56149
|
PrReviewInputSchema,
|
|
56135
56150
|
mapVoteDecisionToPrDecision,
|
|
56136
56151
|
aggregatePrDecisions,
|
|
56137
|
-
buildPrReviewProposal,
|
|
56138
56152
|
registerPrReviewTool,
|
|
56139
56153
|
registerSupplyChainTradeoffPanelTool,
|
|
56140
56154
|
createAnnotationsProxy,
|
|
@@ -56172,4 +56186,4 @@ export {
|
|
|
56172
56186
|
shutdownFeedbackSubscriber,
|
|
56173
56187
|
createEventBusBridge
|
|
56174
56188
|
};
|
|
56175
|
-
//# sourceMappingURL=chunk-
|
|
56189
|
+
//# sourceMappingURL=chunk-ONSYYUB4.js.map
|