nexus-agents 2.152.1 → 2.154.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-FQEYEH7X.js → chunk-25F6LRU2.js} +3 -3
- package/dist/{chunk-RBRUPCZL.js → chunk-6VYNHHII.js} +2 -2
- package/dist/{chunk-KZUJBQYH.js → chunk-KNVO4P4W.js} +163 -13
- package/dist/chunk-KNVO4P4W.js.map +1 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +39 -13
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-types-B06ynHGk.d.ts → consensus-vote-types-BNBMB415.d.ts} +1 -1
- package/dist/index.d.ts +66 -5
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/{setup-command-FMQRL3YR.js → setup-command-OAJCXIMR.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-KZUJBQYH.js.map +0 -1
- /package/dist/{chunk-FQEYEH7X.js.map → chunk-25F6LRU2.js.map} +0 -0
- /package/dist/{chunk-RBRUPCZL.js.map → chunk-6VYNHHII.js.map} +0 -0
- /package/dist/{setup-command-FMQRL3YR.js.map → setup-command-OAJCXIMR.js.map} +0 -0
|
@@ -838,4 +838,4 @@ interface ConsensusVoteResponse {
|
|
|
838
838
|
voteRecordNote?: string;
|
|
839
839
|
}
|
|
840
840
|
|
|
841
|
-
export { type AgentPerformance as A, type RejectionCategory as B, type CliNameLiteral as C, type DecisionCostSummary as D,
|
|
841
|
+
export { type AgentPerformance as A, type RejectionCategory as B, type CliNameLiteral as C, type DecisionCostSummary as D, type ErrorPolicy as E, RejectionCategorySchema as F, VOTING_THRESHOLDS as G, type VoteDecisionStatus as H, type InputModality as I, VoteSchema as J, type VoteThreshold as K, type ModelId as M, type NoQuorumPolicy as N, type OutputModality as O, type Pricing as P, type QualityScores as Q, REJECTION_CATEGORIES as R, type SpecialFeature as S, type ToolCapability as T, type Vote as V, type WeightedVoteCounts as W, type VoteDecision as a, type VoterRole as b, type ConsensusAlgorithm as c, type VoteCounts as d, type ProposalState as e, type ProposalId as f, type ConsensusEngineConfig as g, type ConsensusResult as h, type ProposalStatus as i, type Proposal as j, type ConsensusMetrics as k, type VoterExpansionCallback as l, type AgentVoteResult as m, type VotingStrategy as n, AgentPerformanceSchema as o, type AgentVoteSummary as p, ConsensusAlgorithmSchema as q, ConsensusEngineConfigSchema as r, ConsensusMetricsSchema as s, ConsensusResultSchema as t, type ConsensusVoteInput as u, ConsensusVoteInputSchema as v, type ConsensusVoteResponse as w, DEFAULT_CONSENSUS_CONFIG as x, ProposalSchema as y, ProposalStatusSchema as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ZodError, z, ZodType, ZodSafeParseResult } from 'zod';
|
|
2
|
-
import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, V as Vote, a as VoteDecision$1, b as VoterRole, D as DecisionCostSummary, c as ConsensusAlgorithm, d as VoteCounts, W as WeightedVoteCounts, A as AgentPerformance, e as ProposalState, f as ProposalId, g as ConsensusEngineConfig, h as ConsensusResult, i as ProposalStatus, j as Proposal, k as ConsensusMetrics, l as VoterExpansionCallback, m as AgentVoteResult, n as VotingStrategy } from './consensus-vote-types-
|
|
3
|
-
export { o as AgentPerformanceSchema, p as AgentVoteSummary, q as ConsensusAlgorithmSchema, r as ConsensusEngineConfigSchema, s as ConsensusMetricsSchema, t as ConsensusResultSchema, u as ConsensusVoteInput, v as ConsensusVoteInputSchema, w as ConsensusVoteResponse, x as DEFAULT_CONSENSUS_CONFIG, y as ProposalSchema, z as ProposalStatusSchema, R as REJECTION_CATEGORIES, B as RejectionCategory,
|
|
2
|
+
import { C as CliNameLiteral, I as InputModality, O as OutputModality, T as ToolCapability, S as SpecialFeature, P as Pricing, Q as QualityScores, M as ModelId, V as Vote, a as VoteDecision$1, b as VoterRole, D as DecisionCostSummary, c as ConsensusAlgorithm, d as VoteCounts, W as WeightedVoteCounts, A as AgentPerformance, e as ProposalState, f as ProposalId, g as ConsensusEngineConfig, h as ConsensusResult, i as ProposalStatus, j as Proposal, k as ConsensusMetrics, l as VoterExpansionCallback, m as AgentVoteResult, n as VotingStrategy, E as ErrorPolicy } from './consensus-vote-types-BNBMB415.js';
|
|
3
|
+
export { o as AgentPerformanceSchema, p as AgentVoteSummary, q as ConsensusAlgorithmSchema, r as ConsensusEngineConfigSchema, s as ConsensusMetricsSchema, t as ConsensusResultSchema, u as ConsensusVoteInput, v as ConsensusVoteInputSchema, w as ConsensusVoteResponse, x as DEFAULT_CONSENSUS_CONFIG, y as ProposalSchema, z as ProposalStatusSchema, R as REJECTION_CATEGORIES, B as RejectionCategory, F as RejectionCategorySchema, G as VOTING_THRESHOLDS, H as VoteDecisionStatus, J as VoteSchema } from './consensus-vote-types-BNBMB415.js';
|
|
4
4
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
5
5
|
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
|
|
6
6
|
|
|
@@ -26252,6 +26252,52 @@ type PrReviewRecordOutcome = {
|
|
|
26252
26252
|
readonly detail: string;
|
|
26253
26253
|
};
|
|
26254
26254
|
|
|
26255
|
+
/**
|
|
26256
|
+
* nexus-agents/mcp — PR-Review Large-Diff Budget Packer (#4140, epic #4130).
|
|
26257
|
+
*
|
|
26258
|
+
* Option A of the large-diff affordance: when a PR diff exceeds the voter PANEL
|
|
26259
|
+
* budget (`MAX_DIFF_LENGTH`), pack it down to a REAL, security-prioritized subset
|
|
26260
|
+
* of WHOLE files instead of hard-failing at the schema or lossily hand-truncating
|
|
26261
|
+
* mid-hunk. A packed review is honestly labeled PARTIAL and (per the #4140 C1
|
|
26262
|
+
* gate wired in pr-review-tool.ts) is BARRED from a verified-approve — it can
|
|
26263
|
+
* BLOCK on a reviewed file but never verified-APPROVE.
|
|
26264
|
+
*
|
|
26265
|
+
* This module is PURE, deterministic, and I/O-free: no model call, no filesystem,
|
|
26266
|
+
* no clock. It is unit-testable in isolation and reused by `executePrReviewBody`.
|
|
26267
|
+
*
|
|
26268
|
+
* FILE-BOUNDARY SAFETY is the load-bearing invariant. `splitByFile` splits only on
|
|
26269
|
+
* `^diff --git ` file headers, so each unit is a whole file's hunk-set. The packer
|
|
26270
|
+
* includes each file WHOLE or drops it — worst case a single over-budget file is
|
|
26271
|
+
* included TRUNCATED with an explicit marker AND still listed as partially-seen. A
|
|
26272
|
+
* voter never receives a corrupted mid-hunk fragment that reads as complete.
|
|
26273
|
+
*
|
|
26274
|
+
* NOT built here (deferred): the exhaustive multi-pass arm (#4151), file-fetch
|
|
26275
|
+
* (#4152), and any scored/weighted ranker. Ordering is a documented two-tier
|
|
26276
|
+
* partition (sensitive-path files first, stable; then the rest in diff order) —
|
|
26277
|
+
* NOT a score.
|
|
26278
|
+
*
|
|
26279
|
+
* @module mcp/tools/pr-review-diff-budget
|
|
26280
|
+
*/
|
|
26281
|
+
|
|
26282
|
+
/**
|
|
26283
|
+
* Machine-readable coverage of a large-diff review (#4140). Present ONLY when the
|
|
26284
|
+
* input diff exceeded the panel budget and was packed; ABSENT for a whole-diff
|
|
26285
|
+
* review (a within-budget diff is byte-identical to pre-#4140). `partial: true`
|
|
26286
|
+
* means the verdict was BARRED from a verified-approve (the C1 gate below).
|
|
26287
|
+
*/
|
|
26288
|
+
interface PrReviewCoverage {
|
|
26289
|
+
/** Number of files whose full diff the panel actually reviewed. */
|
|
26290
|
+
readonly reviewedFiles: number;
|
|
26291
|
+
/** Total number of files in the original diff. */
|
|
26292
|
+
readonly totalFiles: number;
|
|
26293
|
+
/** Paths NOT fully reviewed (dropped, or the one truncated-head file). */
|
|
26294
|
+
readonly droppedFiles: readonly string[];
|
|
26295
|
+
/** True when coverage is incomplete (`droppedFiles.length > 0`). */
|
|
26296
|
+
readonly partial: boolean;
|
|
26297
|
+
/** Day-one strategy is always `'budget'` (exhaustive arm deferred to #4151). */
|
|
26298
|
+
readonly strategy: 'budget';
|
|
26299
|
+
}
|
|
26300
|
+
|
|
26255
26301
|
/**
|
|
26256
26302
|
* nexus-agents/mcp - PR Review Tool (#2233 Child 1)
|
|
26257
26303
|
*
|
|
@@ -26273,9 +26319,10 @@ type PrReviewRecordOutcome = {
|
|
|
26273
26319
|
* roles, not code-level. The 5 here are the ones with concrete claims about
|
|
26274
26320
|
* code (#2233). */
|
|
26275
26321
|
declare const PR_REVIEW_ROLES: readonly VoterRole[];
|
|
26276
|
-
/**
|
|
26277
|
-
*
|
|
26278
|
-
*
|
|
26322
|
+
/** Voter PANEL budget: the max diff bytes packed into the proposal sent to the
|
|
26323
|
+
* 5-voter panel. Diffs above this are NOT rejected — they are security-prioritized
|
|
26324
|
+
* and PARTIALLY reviewed (whole-file packing via `pr-review-diff-budget.ts`, #4140).
|
|
26325
|
+
* Also the byte cap the canonical `reviewedDiffHash` binds to (unchanged, #3831). */
|
|
26279
26326
|
declare const MAX_DIFF_LENGTH = 50000;
|
|
26280
26327
|
declare const PrReviewInputSchema: z.ZodObject<{
|
|
26281
26328
|
prTitle: z.ZodString;
|
|
@@ -26358,6 +26405,12 @@ interface PrReviewResponse {
|
|
|
26358
26405
|
* authentic record was written, otherwise `persisted: false` with the reason.
|
|
26359
26406
|
*/
|
|
26360
26407
|
readonly recordOutcome?: PrReviewRecordOutcome;
|
|
26408
|
+
/**
|
|
26409
|
+
* Large-diff review coverage (#4140). Present only when the input diff exceeded
|
|
26410
|
+
* `MAX_DIFF_LENGTH` and was security-prioritized + partially reviewed; absent for
|
|
26411
|
+
* a whole-diff (≤`MAX_DIFF_LENGTH`) review.
|
|
26412
|
+
*/
|
|
26413
|
+
readonly coverage?: PrReviewCoverage;
|
|
26361
26414
|
}
|
|
26362
26415
|
interface PrReviewDeps extends BaseMcpToolDeps {
|
|
26363
26416
|
/**
|
|
@@ -33498,6 +33551,14 @@ interface IterativeConsensusConfig {
|
|
|
33498
33551
|
readonly quickMode?: boolean | undefined;
|
|
33499
33552
|
/** Voting strategy (default: 'higher_order'). */
|
|
33500
33553
|
readonly strategy?: VotingStrategy | undefined;
|
|
33554
|
+
/**
|
|
33555
|
+
* #4138: error policy for the vote (default: 'absolute_quorum'). The dev-pipeline
|
|
33556
|
+
* plan gate opts in to `absolute_quorum` so an errored voter — especially the
|
|
33557
|
+
* contrarian — degrades to a recoverable `no_quorum` (which the bounded
|
|
33558
|
+
* `maxNoQuorumRetries` re-run then terminal path already honors) instead of being
|
|
33559
|
+
* silently dropped from the denominator. Overridable per-caller.
|
|
33560
|
+
*/
|
|
33561
|
+
readonly errorPolicy?: ErrorPolicy | undefined;
|
|
33501
33562
|
/**
|
|
33502
33563
|
* #4135: how many times to re-run the SAME plan when a vote returns
|
|
33503
33564
|
* `no_quorum` — a missing/errored voice, not a rejection — before giving up
|
package/dist/index.js
CHANGED
|
@@ -520,7 +520,7 @@ import {
|
|
|
520
520
|
validateWorkflow,
|
|
521
521
|
validateWorkflowDependencies,
|
|
522
522
|
withLogging
|
|
523
|
-
} from "./chunk-
|
|
523
|
+
} from "./chunk-KNVO4P4W.js";
|
|
524
524
|
import {
|
|
525
525
|
OPENAI_MODELS,
|
|
526
526
|
OPENAI_MODEL_ALIASES,
|
|
@@ -560,7 +560,7 @@ import {
|
|
|
560
560
|
getKnownNexusVarNames,
|
|
561
561
|
startStdioServer,
|
|
562
562
|
validateNexusEnv
|
|
563
|
-
} from "./chunk-
|
|
563
|
+
} from "./chunk-25F6LRU2.js";
|
|
564
564
|
import {
|
|
565
565
|
CliCircuitBreakerIntegration,
|
|
566
566
|
createCliCircuitBreakerIntegration
|
|
@@ -5974,12 +5974,15 @@ function buildExhaustedResult(state, maxIter) {
|
|
|
5974
5974
|
return { vote: state.lastVote ?? fallback, iterations: maxIter, durationMs: totalMs };
|
|
5975
5975
|
}
|
|
5976
5976
|
function buildVotingInput(plan, config) {
|
|
5977
|
-
const
|
|
5977
|
+
const c = config ?? {};
|
|
5978
|
+
const maxLen = c.maxProposalLength ?? DEFAULT_MAX_PROPOSAL_LENGTH;
|
|
5978
5979
|
return {
|
|
5979
5980
|
proposal: plan.slice(0, maxLen),
|
|
5980
|
-
strategy:
|
|
5981
|
-
simulateVotes:
|
|
5982
|
-
quickMode:
|
|
5981
|
+
strategy: c.strategy ?? DEFAULT_STRATEGY,
|
|
5982
|
+
simulateVotes: c.simulateVotes ?? false,
|
|
5983
|
+
quickMode: c.quickMode ?? false,
|
|
5984
|
+
// #4138: the dev-pipeline plan gate opts in to absolute_quorum (overridable).
|
|
5985
|
+
errorPolicy: c.errorPolicy ?? "absolute_quorum"
|
|
5983
5986
|
};
|
|
5984
5987
|
}
|
|
5985
5988
|
async function executeSingleVote(plan, config, log) {
|