nexus-agents 8.8.2 → 8.9.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.
- package/dist/chunk-2ONCHXIW.js +7 -0
- package/dist/{chunk-BYUVLVN7.js → chunk-3W4L63ML.js} +1 -1
- package/dist/chunk-3W4L63ML.js.map +1 -0
- package/dist/{chunk-YQUM3UWK.js → chunk-GRBOJFKA.js} +3 -3
- package/dist/{chunk-W6SM3MU5.js → chunk-ISE53XGS.js} +2 -2
- package/dist/{chunk-FBWOWMEB.js → chunk-ISUMI6BV.js} +20 -18
- package/dist/chunk-ISUMI6BV.js.map +1 -0
- package/dist/{chunk-CQCVEC7P.js → chunk-L4SJAHQF.js} +920 -1086
- package/dist/chunk-L4SJAHQF.js.map +1 -0
- package/dist/{chunk-3YKFLM2B.js → chunk-LP4W7RTH.js} +1 -1
- package/dist/chunk-LP4W7RTH.js.map +1 -0
- package/dist/{chunk-N347WXTT.js → chunk-SHE6SSTO.js} +1 -1
- package/dist/chunk-SHE6SSTO.js.map +1 -0
- package/dist/{chunk-QY3HOLGD.js → chunk-U4RQ4XPP.js} +3 -3
- package/dist/{chunk-MXQG3A5W.js → chunk-XTSDR3HE.js} +973 -129
- package/dist/chunk-XTSDR3HE.js.map +1 -0
- package/dist/{chunk-SQCFKQUR.js → chunk-YUKNO5ZM.js} +3 -3
- package/dist/cli.js +51 -33
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-L4CN33XE.js → consensus-vote-6NUSZPQY.js} +5 -5
- package/dist/{improvement-review-WTZ4JV5V.js → improvement-review-5EYOUAB6.js} +5 -5
- package/dist/index.d.ts +137 -14
- package/dist/index.js +147 -636
- package/dist/index.js.map +1 -1
- package/dist/{issue-triage-PIE3YVCV.js → issue-triage-VRELWGYY.js} +4 -4
- package/dist/{pr-reviewer-helpers-4VDGMGV5.js → pr-reviewer-helpers-IPC6XCRK.js} +4 -4
- package/dist/{setup-data-dir-NU3YBIZB.js → setup-data-dir-LM2IFTFD.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-3YKFLM2B.js.map +0 -1
- package/dist/chunk-BYUVLVN7.js.map +0 -1
- package/dist/chunk-CQCVEC7P.js.map +0 -1
- package/dist/chunk-FBWOWMEB.js.map +0 -1
- package/dist/chunk-H5DTHO7O.js +0 -7
- package/dist/chunk-MXQG3A5W.js.map +0 -1
- package/dist/chunk-N347WXTT.js.map +0 -1
- /package/dist/{chunk-H5DTHO7O.js.map → chunk-2ONCHXIW.js.map} +0 -0
- /package/dist/{chunk-YQUM3UWK.js.map → chunk-GRBOJFKA.js.map} +0 -0
- /package/dist/{chunk-W6SM3MU5.js.map → chunk-ISE53XGS.js.map} +0 -0
- /package/dist/{chunk-QY3HOLGD.js.map → chunk-U4RQ4XPP.js.map} +0 -0
- /package/dist/{chunk-SQCFKQUR.js.map → chunk-YUKNO5ZM.js.map} +0 -0
- /package/dist/{consensus-vote-L4CN33XE.js.map → consensus-vote-6NUSZPQY.js.map} +0 -0
- /package/dist/{improvement-review-WTZ4JV5V.js.map → improvement-review-5EYOUAB6.js.map} +0 -0
- /package/dist/{issue-triage-PIE3YVCV.js.map → issue-triage-VRELWGYY.js.map} +0 -0
- /package/dist/{pr-reviewer-helpers-4VDGMGV5.js.map → pr-reviewer-helpers-IPC6XCRK.js.map} +0 -0
- /package/dist/{setup-data-dir-NU3YBIZB.js.map → setup-data-dir-LM2IFTFD.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
formatDetectionMessage
|
|
6
6
|
} from "./chunk-4QHAMZLU.js";
|
|
7
7
|
import {
|
|
8
|
+
assessPRReputation,
|
|
8
9
|
calculateConsensus,
|
|
9
10
|
countByCategory,
|
|
10
11
|
countBySeverity,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
parseFindings,
|
|
20
21
|
reviewPostingBlock,
|
|
21
22
|
sumFindings
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ISUMI6BV.js";
|
|
23
24
|
import "./chunk-AOS7F4QR.js";
|
|
24
25
|
import {
|
|
25
26
|
runConfigInitSync
|
|
@@ -153,7 +154,7 @@ import {
|
|
|
153
154
|
validateNexusEnv,
|
|
154
155
|
validateWorkflow,
|
|
155
156
|
wrapInMarkdownFence
|
|
156
|
-
} from "./chunk-
|
|
157
|
+
} from "./chunk-L4SJAHQF.js";
|
|
157
158
|
import "./chunk-7AU5WLAJ.js";
|
|
158
159
|
import "./chunk-DGWT7DXX.js";
|
|
159
160
|
import "./chunk-64GMIUM5.js";
|
|
@@ -161,7 +162,7 @@ import "./chunk-3XQK4MEF.js";
|
|
|
161
162
|
import {
|
|
162
163
|
CATEGORY_DISPLAY_NAMES,
|
|
163
164
|
DEFAULT_PR_REVIEW_CONFIG
|
|
164
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-3W4L63ML.js";
|
|
165
166
|
import {
|
|
166
167
|
DATA_SUBDIRECTORIES,
|
|
167
168
|
checkApiKeys,
|
|
@@ -173,7 +174,7 @@ import {
|
|
|
173
174
|
doctorCommand,
|
|
174
175
|
initDataDirectories,
|
|
175
176
|
runDoctor
|
|
176
|
-
} from "./chunk-
|
|
177
|
+
} from "./chunk-U4RQ4XPP.js";
|
|
177
178
|
import {
|
|
178
179
|
buildOpenAICompatAdapters,
|
|
179
180
|
readOpenAICompatEnv
|
|
@@ -192,7 +193,7 @@ import {
|
|
|
192
193
|
recordAuthenticVote,
|
|
193
194
|
registerConsensusVoteTool,
|
|
194
195
|
toRecordDecision
|
|
195
|
-
} from "./chunk-
|
|
196
|
+
} from "./chunk-YUKNO5ZM.js";
|
|
196
197
|
import {
|
|
197
198
|
loadUsageEvents,
|
|
198
199
|
rollupByModel
|
|
@@ -205,16 +206,17 @@ import {
|
|
|
205
206
|
synthesizeResearch
|
|
206
207
|
} from "./chunk-ZGHJMFQ6.js";
|
|
207
208
|
import {
|
|
208
|
-
|
|
209
|
+
configureUntrustedInputFirewall,
|
|
209
210
|
createFullGitHubProvider,
|
|
210
211
|
evaluatePolicy,
|
|
211
|
-
parsePRUrl
|
|
212
|
-
|
|
212
|
+
parsePRUrl,
|
|
213
|
+
runUntrustedInputFirewall
|
|
214
|
+
} from "./chunk-XTSDR3HE.js";
|
|
213
215
|
import "./chunk-Q5V3KTUL.js";
|
|
214
216
|
import {
|
|
215
217
|
ReputationCache,
|
|
216
218
|
sanitizeInput
|
|
217
|
-
} from "./chunk-
|
|
219
|
+
} from "./chunk-SHE6SSTO.js";
|
|
218
220
|
import {
|
|
219
221
|
ImprovementReviewInputSchema,
|
|
220
222
|
calculateFitnessScore,
|
|
@@ -228,16 +230,16 @@ import {
|
|
|
228
230
|
registerImprovementReviewTool,
|
|
229
231
|
runImprovementReview,
|
|
230
232
|
scanForSecrets
|
|
231
|
-
} from "./chunk-
|
|
233
|
+
} from "./chunk-ISE53XGS.js";
|
|
232
234
|
import {
|
|
233
235
|
createDefaultPolicyFirewall,
|
|
234
236
|
setGlobalPolicyFirewall,
|
|
235
237
|
stagePolicyFirewallForRollout
|
|
236
|
-
} from "./chunk-
|
|
238
|
+
} from "./chunk-GRBOJFKA.js";
|
|
237
239
|
import {
|
|
238
240
|
VERSION
|
|
239
|
-
} from "./chunk-
|
|
240
|
-
import "./chunk-
|
|
241
|
+
} from "./chunk-2ONCHXIW.js";
|
|
242
|
+
import "./chunk-LP4W7RTH.js";
|
|
241
243
|
import {
|
|
242
244
|
createUnifiedRegistry,
|
|
243
245
|
getGlobalRegistry
|
|
@@ -4175,6 +4177,7 @@ function handleModeCommand(args) {
|
|
|
4175
4177
|
|
|
4176
4178
|
// src/dogfooding/pr-reviewer.ts
|
|
4177
4179
|
var logger5 = createLogger({ component: "PRReviewer" });
|
|
4180
|
+
var REVIEW_ACCESS_CONTEXT = { hasWriteAccess: true, hasSecretAccess: true };
|
|
4178
4181
|
var PRReviewer = class {
|
|
4179
4182
|
config;
|
|
4180
4183
|
observer;
|
|
@@ -4199,21 +4202,26 @@ var PRReviewer = class {
|
|
|
4199
4202
|
const fetchResult = await this.fetchPRData(owner, repo, prNumber);
|
|
4200
4203
|
if (!fetchResult.ok) return fetchResult;
|
|
4201
4204
|
const { metadata: prMetadata, provider, accountAgeDays } = fetchResult.value;
|
|
4202
|
-
const
|
|
4205
|
+
const reputation = assessPRReputation(
|
|
4206
|
+
prMetadata,
|
|
4207
|
+
this.reputationCache,
|
|
4208
|
+
this.config.enableReputation,
|
|
4209
|
+
accountAgeDays
|
|
4210
|
+
);
|
|
4211
|
+
const firewall = this.classifyPRAuthor(prMetadata, reputation);
|
|
4212
|
+
if (!firewall.ok) return firewall;
|
|
4213
|
+
const trustResult = firewall.value.trust;
|
|
4203
4214
|
logger5.info("PR author trust classified", {
|
|
4204
4215
|
prNumber,
|
|
4205
4216
|
author: prMetadata.author,
|
|
4206
4217
|
trustTier: trustResult.trustTier,
|
|
4207
4218
|
userRole: trustResult.userRole,
|
|
4208
|
-
|
|
4219
|
+
// Logged only when measured (#4992).
|
|
4220
|
+
...firewall.value.isAllowlisted !== void 0 ? { isAllowlisted: firewall.value.isAllowlisted } : {}
|
|
4209
4221
|
});
|
|
4210
|
-
const
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
accountAgeDays,
|
|
4214
|
-
this.reputationCache,
|
|
4215
|
-
this.config.enableReputation
|
|
4216
|
-
);
|
|
4222
|
+
const gated = gatePRAuthor(prMetadata, firewall.value, reputation);
|
|
4223
|
+
if (!gated.ok) return gated;
|
|
4224
|
+
const { gateDecision, trustAssessment } = gated.value;
|
|
4217
4225
|
const expertReviews = await this.runExpertReviews(prMetadata, traceId);
|
|
4218
4226
|
const result = this.aggregateReviews(prMetadata, expertReviews, startTime, trustAssessment);
|
|
4219
4227
|
const postOutcome = this.config.dryRun ? { status: "skipped", reason: "dry-run" } : await this.postReviewToGitHub(provider, parseResult.value, result, gateDecision);
|
|
@@ -4296,14 +4304,24 @@ var PRReviewer = class {
|
|
|
4296
4304
|
};
|
|
4297
4305
|
}
|
|
4298
4306
|
/**
|
|
4299
|
-
* Classifies the PR author's trust tier
|
|
4300
|
-
*
|
|
4307
|
+
* Classifies the PR author's trust tier through the shared firewall (#4992;
|
|
4308
|
+
* originally Issue #828 — Wire security modules into production pipeline).
|
|
4309
|
+
*
|
|
4310
|
+
* No maintainer allowlist is passed: there is no source for one today (no
|
|
4311
|
+
* config field, no env var), so none is consulted and `isAllowlisted` stays
|
|
4312
|
+
* absent on the result rather than being recorded as `false`.
|
|
4301
4313
|
*/
|
|
4302
|
-
classifyPRAuthor(pr) {
|
|
4303
|
-
return
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4314
|
+
classifyPRAuthor(pr, reputation) {
|
|
4315
|
+
return runUntrustedInputFirewall(
|
|
4316
|
+
{
|
|
4317
|
+
type: "pull_request",
|
|
4318
|
+
username: pr.author,
|
|
4319
|
+
authorAssociation: pr.authorAssociation,
|
|
4320
|
+
title: pr.title,
|
|
4321
|
+
body: pr.body
|
|
4322
|
+
},
|
|
4323
|
+
{ context: REVIEW_ACCESS_CONTEXT, reputation: { assessment: reputation } }
|
|
4324
|
+
);
|
|
4307
4325
|
}
|
|
4308
4326
|
/**
|
|
4309
4327
|
* Sanitizes untrusted PR content (body/title) before embedding in expert tasks.
|
|
@@ -4460,7 +4478,7 @@ ${file.patch}
|
|
|
4460
4478
|
violations: policyResult.violations
|
|
4461
4479
|
});
|
|
4462
4480
|
}
|
|
4463
|
-
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-
|
|
4481
|
+
const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-IPC6XCRK.js");
|
|
4464
4482
|
const body = formatReviewComment2(result);
|
|
4465
4483
|
const postResult = await provider.createReview(pr.prNumber, body, result.decision);
|
|
4466
4484
|
if (!postResult.ok) {
|
|
@@ -4476,8 +4494,7 @@ ${file.patch}
|
|
|
4476
4494
|
auditReviewAction(enforcedTier) {
|
|
4477
4495
|
const context = {
|
|
4478
4496
|
inputTrustTier: enforcedTier,
|
|
4479
|
-
|
|
4480
|
-
hasSecretAccess: true
|
|
4497
|
+
...REVIEW_ACCESS_CONTEXT
|
|
4481
4498
|
};
|
|
4482
4499
|
const decision = evaluatePolicy(
|
|
4483
4500
|
{
|
|
@@ -19667,7 +19684,7 @@ function startImprovementReviewScheduler(options) {
|
|
|
19667
19684
|
let running = false;
|
|
19668
19685
|
const runOnce = async () => {
|
|
19669
19686
|
try {
|
|
19670
|
-
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-
|
|
19687
|
+
const { runImprovementReview: runImprovementReview2, ImprovementReviewInputSchema: ImprovementReviewInputSchema2 } = await import("./improvement-review-5EYOUAB6.js");
|
|
19671
19688
|
const input = ImprovementReviewInputSchema2.parse({ fileIssues });
|
|
19672
19689
|
const result = await runImprovementReview2(input, { logger: logger22 });
|
|
19673
19690
|
logger22.info("Scheduled improvement_review complete", {
|
|
@@ -20310,6 +20327,7 @@ function initV2PipelineSubsystems(logger22, auditLogger) {
|
|
|
20310
20327
|
const pipelineEventBus = getPipelineEventBus();
|
|
20311
20328
|
const bridge = createEventBusBridge({ source: pipelineEventBus });
|
|
20312
20329
|
startTuneStage(pipelineEventBus, auditLogger !== void 0 ? { auditLogger } : void 0);
|
|
20330
|
+
configureUntrustedInputFirewall(auditLogger !== void 0 ? { auditLogger } : {});
|
|
20313
20331
|
startSwarmHealthSignals(getSwarmObserver(), pipelineEventBus);
|
|
20314
20332
|
startFailoverSignals({ pipelineBus: pipelineEventBus });
|
|
20315
20333
|
startImprovementReviewScheduler();
|