nexus-agents 2.92.0 → 2.92.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.
Files changed (28) hide show
  1. package/dist/{chunk-LOBVTRQQ.js → chunk-3HVSXLPL.js} +3 -3
  2. package/dist/{chunk-HPV2D4HN.js → chunk-F47QKVPH.js} +4 -4
  3. package/dist/{chunk-RS6RGSYG.js → chunk-G5XKEUAP.js} +46 -3
  4. package/dist/chunk-G5XKEUAP.js.map +1 -0
  5. package/dist/{chunk-S4UF577T.js → chunk-OK6U5N5Y.js} +1 -1
  6. package/dist/chunk-OK6U5N5Y.js.map +1 -0
  7. package/dist/{chunk-4N54BTZU.js → chunk-UYOHV3EG.js} +30 -8
  8. package/dist/chunk-UYOHV3EG.js.map +1 -0
  9. package/dist/{chunk-VW2LBC7B.js → chunk-XNBPE6WG.js} +2 -2
  10. package/dist/cli.d.ts +1 -1
  11. package/dist/cli.js +23 -40
  12. package/dist/cli.js.map +1 -1
  13. package/dist/{consensus-vote-B6W7YQ6K.js → consensus-vote-VSRNSZ5J.js} +4 -2
  14. package/dist/{consensus-vote-types-COAhHVIp.d.ts → consensus-vote-types-WGBFeT7y.d.ts} +6 -0
  15. package/dist/index.d.ts +192 -192
  16. package/dist/index.js +5 -5
  17. package/dist/{pr-reviewer-helpers-7D2W5HTO.js → pr-reviewer-helpers-RBUEJI6V.js} +7 -3
  18. package/dist/{setup-command-UN3XDJ2H.js → setup-command-BMELLUUX.js} +3 -3
  19. package/package.json +1 -1
  20. package/dist/chunk-4N54BTZU.js.map +0 -1
  21. package/dist/chunk-RS6RGSYG.js.map +0 -1
  22. package/dist/chunk-S4UF577T.js.map +0 -1
  23. /package/dist/{chunk-LOBVTRQQ.js.map → chunk-3HVSXLPL.js.map} +0 -0
  24. /package/dist/{chunk-HPV2D4HN.js.map → chunk-F47QKVPH.js.map} +0 -0
  25. /package/dist/{chunk-VW2LBC7B.js.map → chunk-XNBPE6WG.js.map} +0 -0
  26. /package/dist/{consensus-vote-B6W7YQ6K.js.map → consensus-vote-VSRNSZ5J.js.map} +0 -0
  27. /package/dist/{pr-reviewer-helpers-7D2W5HTO.js.map → pr-reviewer-helpers-RBUEJI6V.js.map} +0 -0
  28. /package/dist/{setup-command-UN3XDJ2H.js.map → setup-command-BMELLUUX.js.map} +0 -0
@@ -8,7 +8,7 @@ import {
8
8
  checkSqlite,
9
9
  defaultConfig,
10
10
  initDataDirectories
11
- } from "./chunk-LOBVTRQQ.js";
11
+ } from "./chunk-3HVSXLPL.js";
12
12
  import {
13
13
  probeAllClis
14
14
  } from "./chunk-X5BQF6HM.js";
@@ -1987,4 +1987,4 @@ export {
1987
1987
  setupCommand,
1988
1988
  setupCommandAsync
1989
1989
  };
1990
- //# sourceMappingURL=chunk-VW2LBC7B.js.map
1990
+ //# sourceMappingURL=chunk-XNBPE6WG.js.map
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { C as CliNameLiteral, e as VoteThreshold, E as ErrorPolicy } from './consensus-vote-types-COAhHVIp.js';
2
+ import { C as CliNameLiteral, e as VoteThreshold, E as ErrorPolicy } from './consensus-vote-types-WGBFeT7y.js';
3
3
  import 'zod';
4
4
 
5
5
  /**
package/dist/cli.js CHANGED
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
- assessPRReputation,
4
- buildPRTrustAssessment,
5
3
  calculateConsensus,
6
4
  countByCategory,
7
5
  countBySeverity,
@@ -9,11 +7,13 @@ import {
9
7
  determineApproval,
10
8
  determineDecision,
11
9
  extractSummary,
10
+ fetchAccountAgeDays,
12
11
  formatReviewComment,
12
+ gatePRAuthor,
13
13
  generateSummary,
14
14
  parseFindings,
15
15
  sumFindings
16
- } from "./chunk-RS6RGSYG.js";
16
+ } from "./chunk-G5XKEUAP.js";
17
17
  import "./chunk-AQTHLUCP.js";
18
18
  import {
19
19
  buildOpenAICompatAdapters,
@@ -24,7 +24,7 @@ import {
24
24
  import {
25
25
  setupCommandAsync,
26
26
  verifyCommand
27
- } from "./chunk-VW2LBC7B.js";
27
+ } from "./chunk-XNBPE6WG.js";
28
28
  import "./chunk-2SMTCNXP.js";
29
29
  import {
30
30
  AuthHandler,
@@ -164,14 +164,14 @@ import {
164
164
  validateCommand,
165
165
  validateWorkflow,
166
166
  wrapInMarkdownFence
167
- } from "./chunk-HPV2D4HN.js";
167
+ } from "./chunk-F47QKVPH.js";
168
168
  import {
169
169
  resolveToken
170
170
  } from "./chunk-EAT4GTMT.js";
171
171
  import {
172
172
  CATEGORY_DISPLAY_NAMES,
173
173
  DEFAULT_PR_REVIEW_CONFIG
174
- } from "./chunk-S4UF577T.js";
174
+ } from "./chunk-OK6U5N5Y.js";
175
175
  import "./chunk-E6W4Z6GN.js";
176
176
  import "./chunk-3LKW4IEW.js";
177
177
  import {
@@ -194,7 +194,7 @@ import {
194
194
  toolSuccessStructured,
195
195
  warnIfSimulatedOutsideTests,
196
196
  wrapToolWithTimeout
197
- } from "./chunk-4N54BTZU.js";
197
+ } from "./chunk-UYOHV3EG.js";
198
198
  import "./chunk-3FVSYMHK.js";
199
199
  import "./chunk-Y7E5ZWRQ.js";
200
200
  import {
@@ -212,8 +212,6 @@ import {
212
212
  import "./chunk-EFHZHCF2.js";
213
213
  import {
214
214
  ReputationCache,
215
- gateWithReputation,
216
- resolveReputationGatingMode,
217
215
  sanitizeInput
218
216
  } from "./chunk-NR4NSTJH.js";
219
217
  import "./chunk-57HMLBYN.js";
@@ -242,7 +240,7 @@ import {
242
240
  loadConfig,
243
241
  runDoctor,
244
242
  validateNexusEnv
245
- } from "./chunk-LOBVTRQQ.js";
243
+ } from "./chunk-3HVSXLPL.js";
246
244
  import "./chunk-SFZESA5O.js";
247
245
  import "./chunk-6Q33PBXC.js";
248
246
  import {
@@ -2866,7 +2864,7 @@ var PRReviewer = class {
2866
2864
  const { owner, repo, prNumber } = parseResult.value;
2867
2865
  const fetchResult = await this.fetchPRData(owner, repo, prNumber);
2868
2866
  if (!fetchResult.ok) return fetchResult;
2869
- const { metadata: prMetadata, provider } = fetchResult.value;
2867
+ const { metadata: prMetadata, provider, accountAgeDays } = fetchResult.value;
2870
2868
  const trustResult = this.classifyPRAuthor(prMetadata);
2871
2869
  logger2.info("PR author trust classified", {
2872
2870
  prNumber,
@@ -2875,7 +2873,13 @@ var PRReviewer = class {
2875
2873
  userRole: trustResult.userRole,
2876
2874
  isAllowlisted: trustResult.isAllowlisted
2877
2875
  });
2878
- const { gateDecision, trustAssessment } = this.gatePRAuthor(prMetadata, trustResult);
2876
+ const { gateDecision, trustAssessment } = gatePRAuthor(
2877
+ prMetadata,
2878
+ trustResult,
2879
+ accountAgeDays,
2880
+ this.reputationCache,
2881
+ this.config.enableReputation
2882
+ );
2879
2883
  const expertReviews = await this.runExpertReviews(prMetadata, traceId);
2880
2884
  const result = this.aggregateReviews(prMetadata, expertReviews, startTime, trustAssessment);
2881
2885
  if (!this.config.dryRun) {
@@ -2968,32 +2972,6 @@ var PRReviewer = class {
2968
2972
  authorAssociation: pr.authorAssociation
2969
2973
  });
2970
2974
  }
2971
- /**
2972
- * Assesses the PR author's reputation and applies the gating rollout mode
2973
- * (#3123). Returns the gate decision (for the policy gate) and the assessment
2974
- * surfaced on the result. A suppressed demotion (audit/off) is logged.
2975
- */
2976
- gatePRAuthor(pr, trustResult) {
2977
- const reputation = assessPRReputation(pr, this.reputationCache, this.config.enableReputation);
2978
- const gateDecision = gateWithReputation(
2979
- trustResult.trustTier,
2980
- reputation,
2981
- resolveReputationGatingMode()
2982
- );
2983
- if (gateDecision.demotionSuppressed) {
2984
- logger2.warn("Reputation demotion suppressed by gating mode (would block under enforce)", {
2985
- prNumber: pr.number,
2986
- author: pr.author,
2987
- mode: gateDecision.mode,
2988
- classifierTier: trustResult.trustTier,
2989
- reconciledTier: gateDecision.reconciledTier
2990
- });
2991
- }
2992
- return {
2993
- gateDecision,
2994
- trustAssessment: buildPRTrustAssessment(trustResult, reputation, gateDecision)
2995
- };
2996
- }
2997
2975
  /**
2998
2976
  * Sanitizes untrusted PR content (body/title) before embedding in expert tasks.
2999
2977
  * Uses the security/input-sanitizer pipeline to strip injection vectors.
@@ -3131,7 +3109,7 @@ ${file.patch}
3131
3109
  violations: policyResult.violations
3132
3110
  });
3133
3111
  }
3134
- const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-7D2W5HTO.js");
3112
+ const { formatReviewComment: formatReviewComment2 } = await import("./pr-reviewer-helpers-RBUEJI6V.js");
3135
3113
  const body = formatReviewComment2(result);
3136
3114
  const postResult = await provider.createReview(pr.prNumber, body, result.decision);
3137
3115
  if (!postResult.ok) {
@@ -3175,6 +3153,7 @@ ${file.patch}
3175
3153
  const detailResult = await provider.getPullRequestDetail(prNumber);
3176
3154
  if (!detailResult.ok) return err(detailResult.error);
3177
3155
  const detail = detailResult.value;
3156
+ const accountAgeDays = this.config.enableReputation ? await fetchAccountAgeDays(provider, detail.author) : void 0;
3178
3157
  const metadata = {
3179
3158
  number: detail.number,
3180
3159
  title: detail.title,
@@ -3200,7 +3179,11 @@ ${file.patch}
3200
3179
  additions: detail.additions,
3201
3180
  deletions: detail.deletions
3202
3181
  };
3203
- return ok({ metadata, provider });
3182
+ return ok({
3183
+ metadata,
3184
+ provider,
3185
+ ...accountAgeDays !== void 0 ? { accountAgeDays } : {}
3186
+ });
3204
3187
  }
3205
3188
  /**
3206
3189
  * Gets the SwarmObserver for debugging.