nexus-agents 8.50.1 → 8.51.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-BDEJZJ4F.js → chunk-2UKT2NN6.js} +7 -7
- package/dist/{chunk-CF2P5DU7.js → chunk-6UXL574Z.js} +38 -12
- package/dist/chunk-6UXL574Z.js.map +1 -0
- package/dist/{chunk-72UT4RMR.js → chunk-DG46QLR7.js} +2 -2
- package/dist/{chunk-K7CW5TUO.js → chunk-NEZWOPAB.js} +3 -3
- package/dist/{chunk-GWEKM2BQ.js → chunk-O53OFCGZ.js} +2 -2
- package/dist/{chunk-OREMR3FL.js → chunk-WMPXFL7M.js} +2 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +42 -21
- package/dist/cli.js.map +1 -1
- package/dist/{consensus-vote-WOZQWVXF.js → consensus-vote-A3KFPWYY.js} +4 -4
- package/dist/{consensus-vote-types-BRwJWxvu.d.ts → consensus-vote-types-DQGFfLnp.d.ts} +25 -0
- package/dist/{improvement-review-2T7E4AJC.js → improvement-review-HLTUCQ25.js} +4 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-Y4OCPUCO.js → setup-data-dir-ZJYYDDEP.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-CF2P5DU7.js.map +0 -1
- /package/dist/{chunk-BDEJZJ4F.js.map → chunk-2UKT2NN6.js.map} +0 -0
- /package/dist/{chunk-72UT4RMR.js.map → chunk-DG46QLR7.js.map} +0 -0
- /package/dist/{chunk-K7CW5TUO.js.map → chunk-NEZWOPAB.js.map} +0 -0
- /package/dist/{chunk-GWEKM2BQ.js.map → chunk-O53OFCGZ.js.map} +0 -0
- /package/dist/{chunk-OREMR3FL.js.map → chunk-WMPXFL7M.js.map} +0 -0
- /package/dist/{consensus-vote-WOZQWVXF.js.map → consensus-vote-A3KFPWYY.js.map} +0 -0
- /package/dist/{improvement-review-2T7E4AJC.js.map → improvement-review-HLTUCQ25.js.map} +0 -0
- /package/dist/{setup-data-dir-Y4OCPUCO.js.map → setup-data-dir-ZJYYDDEP.js.map} +0 -0
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
DEFAULT_TASK_TTL_MS,
|
|
23
23
|
clampTaskTtl
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NEZWOPAB.js";
|
|
25
25
|
import {
|
|
26
26
|
executeExpert
|
|
27
27
|
} from "./chunk-JVDSK3D3.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
toJobSummary,
|
|
59
59
|
updateStage,
|
|
60
60
|
writeJobCancelled
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-6UXL574Z.js";
|
|
62
62
|
import {
|
|
63
63
|
allOf,
|
|
64
64
|
anyOf
|
|
@@ -78,7 +78,7 @@ import {
|
|
|
78
78
|
} from "./chunk-4QY24KIB.js";
|
|
79
79
|
import {
|
|
80
80
|
withPrerequisite
|
|
81
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-O53OFCGZ.js";
|
|
82
82
|
import {
|
|
83
83
|
NOOP_NOTIFIER,
|
|
84
84
|
RateLimiter,
|
|
@@ -103,7 +103,7 @@ import {
|
|
|
103
103
|
withAuditTrail,
|
|
104
104
|
withProgressHeartbeat,
|
|
105
105
|
wrapToolWithTimeout
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-DG46QLR7.js";
|
|
107
107
|
import {
|
|
108
108
|
createAuditTrail,
|
|
109
109
|
createGraphAuditBridge,
|
|
@@ -46165,7 +46165,7 @@ function buildVotingInput(plan, config) {
|
|
|
46165
46165
|
}
|
|
46166
46166
|
async function executeSingleVote(plan, config, log) {
|
|
46167
46167
|
try {
|
|
46168
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
46168
|
+
const { executeVoting } = await import("./consensus-vote-A3KFPWYY.js");
|
|
46169
46169
|
const input = buildVotingInput(plan, config);
|
|
46170
46170
|
const result = await executeVoting(input, log);
|
|
46171
46171
|
return parseVotingResult(result);
|
|
@@ -47960,7 +47960,7 @@ ${contextBlock}`;
|
|
|
47960
47960
|
const strategy = config.votingStrategy ?? "higher_order";
|
|
47961
47961
|
await postProgress(config, "Vote", `Running consensus with ${strategy} strategy...`);
|
|
47962
47962
|
try {
|
|
47963
|
-
const { executeVoting } = await import("./consensus-vote-
|
|
47963
|
+
const { executeVoting } = await import("./consensus-vote-A3KFPWYY.js");
|
|
47964
47964
|
const votingResult = await executeVoting(
|
|
47965
47965
|
{
|
|
47966
47966
|
proposal: buildVoteProposal(plan, research),
|
|
@@ -56870,4 +56870,4 @@ export {
|
|
|
56870
56870
|
startPipelineEventBridge,
|
|
56871
56871
|
shutdownPipelineEventBridge
|
|
56872
56872
|
};
|
|
56873
|
-
//# sourceMappingURL=chunk-
|
|
56873
|
+
//# sourceMappingURL=chunk-2UKT2NN6.js.map
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
toolSuccessStructured,
|
|
24
24
|
withProgressHeartbeat,
|
|
25
25
|
wrapToolWithTimeout
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-DG46QLR7.js";
|
|
27
27
|
import {
|
|
28
28
|
VERSION
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-WMPXFL7M.js";
|
|
30
30
|
import {
|
|
31
31
|
UNRESOLVED_MODEL_ID,
|
|
32
32
|
assessPanelIndependence,
|
|
@@ -4998,6 +4998,7 @@ var VoteDecisionStatusSchema = z6.enum([
|
|
|
4998
4998
|
"timeout",
|
|
4999
4999
|
"no_quorum"
|
|
5000
5000
|
]);
|
|
5001
|
+
var ContrarianCheckStatusSchema = z6.enum(["ok", "errored", "skipped"]);
|
|
5001
5002
|
function toRecordDecision(status) {
|
|
5002
5003
|
switch (status) {
|
|
5003
5004
|
case "approved":
|
|
@@ -5150,13 +5151,15 @@ function appliedThresholdFor(strategy) {
|
|
|
5150
5151
|
if (bar >= SUPERMAJORITY_THRESHOLD) return "supermajority";
|
|
5151
5152
|
return "majority";
|
|
5152
5153
|
}
|
|
5154
|
+
function contrarianCheckFor(result) {
|
|
5155
|
+
return result.contrarianCheck ?? "skipped";
|
|
5156
|
+
}
|
|
5153
5157
|
function buildResponse(input, result, costSummary, voteRecord) {
|
|
5154
5158
|
const proposalTruncated = input.proposal.length > 200 ? input.proposal.slice(0, 200) + "..." : input.proposal;
|
|
5155
5159
|
const errorCount = result.votes.filter((v) => v.source === "error").length;
|
|
5156
5160
|
const unverifiableCount = result.votes.filter((v) => v.source === "unverifiable").length;
|
|
5157
5161
|
const resolved = resolveVoteDecision(input, result, errorCount);
|
|
5158
5162
|
const decision = result.decision ?? resolved.decision;
|
|
5159
|
-
const { degradeReason } = resolved;
|
|
5160
5163
|
const response = {
|
|
5161
5164
|
proposal: proposalTruncated,
|
|
5162
5165
|
strategy: result.strategy,
|
|
@@ -5169,6 +5172,7 @@ function buildResponse(input, result, costSummary, voteRecord) {
|
|
|
5169
5172
|
error: errorCount,
|
|
5170
5173
|
unverifiable: unverifiableCount
|
|
5171
5174
|
},
|
|
5175
|
+
contrarianCheck: contrarianCheckFor(result),
|
|
5172
5176
|
votes: result.votes.map(toAgentVoteSummary),
|
|
5173
5177
|
durationMs: result.totalTimeMs,
|
|
5174
5178
|
simulateVotes: result.simulateVotes,
|
|
@@ -5193,7 +5197,7 @@ function buildResponse(input, result, costSummary, voteRecord) {
|
|
|
5193
5197
|
};
|
|
5194
5198
|
}
|
|
5195
5199
|
applyOptionalResponseFields(response, input, result, errorCount, costSummary);
|
|
5196
|
-
applyAbsoluteQuorumTelemetry(response, input, decision, degradeReason);
|
|
5200
|
+
applyAbsoluteQuorumTelemetry(response, input, decision, resolved.degradeReason);
|
|
5197
5201
|
return response;
|
|
5198
5202
|
}
|
|
5199
5203
|
function applyOptionalResponseFields(response, input, result, errorCount, costSummary) {
|
|
@@ -7565,33 +7569,46 @@ function buildPolicyShortCircuitResult(args) {
|
|
|
7565
7569
|
// in buildResponse has PANEL_SIZE + contrarian-presence even on a short-circuit.
|
|
7566
7570
|
panelSize: args.roles.length,
|
|
7567
7571
|
contrarianRequested: args.roles.includes("catfish"),
|
|
7572
|
+
// #6111: the short-circuit returns before the escalation gate, so the
|
|
7573
|
+
// quick-mode contrarian check never ran.
|
|
7574
|
+
contrarianCheck: "skipped",
|
|
7568
7575
|
// #3124: surface WHY a high-approval result is still 'rejected' so callers
|
|
7569
7576
|
// don't mistake a fail-closed policy short-circuit for a genuine rejection.
|
|
7570
7577
|
policyReason: args.reason
|
|
7571
7578
|
};
|
|
7572
7579
|
}
|
|
7573
7580
|
async function maybeEscalateContrarian(input, outcome, ctx, logger11, opts) {
|
|
7574
|
-
if (!input.quickMode || outcome !== "approved" || input.simulateVotes)
|
|
7581
|
+
if (!input.quickMode || outcome !== "approved" || input.simulateVotes) {
|
|
7582
|
+
return { contrarianCheck: "skipped" };
|
|
7583
|
+
}
|
|
7575
7584
|
if (shouldEscalateLowPosterior(ctx.strategy, outcome, input.quickMode, ctx.posteriorApproval)) {
|
|
7576
7585
|
logger11.warn("Posterior-confidence escalation: re-running with full vote (#3174)", {
|
|
7577
7586
|
strategy: ctx.strategy,
|
|
7578
7587
|
posteriorApproval: ctx.posteriorApproval
|
|
7579
7588
|
});
|
|
7580
|
-
return {
|
|
7589
|
+
return {
|
|
7590
|
+
escalated: await executeVoting({ ...input, quickMode: false }, logger11, opts),
|
|
7591
|
+
contrarianCheck: "skipped"
|
|
7592
|
+
};
|
|
7581
7593
|
}
|
|
7582
7594
|
const escalation = await runContrarianCheck(input.proposal, logger11);
|
|
7595
|
+
const contrarianCheck = escalation.errored ? "errored" : "ok";
|
|
7583
7596
|
if (escalation.errored && input.errorPolicy === "absolute_quorum") {
|
|
7584
7597
|
logger11.warn("Contrarian check errored under absolute_quorum \u2014 degrading to no_quorum (#4132)");
|
|
7585
7598
|
return {
|
|
7586
|
-
degradeReason: "no_quorum: re-run \u2014 contrarian check errored (absolute_quorum quick-mode)"
|
|
7599
|
+
degradeReason: "no_quorum: re-run \u2014 contrarian check errored (absolute_quorum quick-mode)",
|
|
7600
|
+
contrarianCheck
|
|
7587
7601
|
};
|
|
7588
7602
|
}
|
|
7589
|
-
if (!escalation.shouldEscalate) return {};
|
|
7603
|
+
if (!escalation.shouldEscalate) return { contrarianCheck };
|
|
7590
7604
|
logger11.warn("Contrarian escalation: re-running with full vote", {
|
|
7591
7605
|
reason: escalation.reason,
|
|
7592
7606
|
confidence: escalation.confidence
|
|
7593
7607
|
});
|
|
7594
|
-
return {
|
|
7608
|
+
return {
|
|
7609
|
+
escalated: await executeVoting({ ...input, quickMode: false }, logger11, opts),
|
|
7610
|
+
contrarianCheck
|
|
7611
|
+
};
|
|
7595
7612
|
}
|
|
7596
7613
|
async function executeVoting(input, logger11, opts) {
|
|
7597
7614
|
const result = await executeVotingInner(input, logger11, opts ?? {});
|
|
@@ -7672,7 +7689,9 @@ async function executeVotingInner(input, logger11, opts) {
|
|
|
7672
7689
|
logger11,
|
|
7673
7690
|
opts
|
|
7674
7691
|
);
|
|
7675
|
-
if (escalation.escalated !== void 0)
|
|
7692
|
+
if (escalation.escalated !== void 0) {
|
|
7693
|
+
return { ...escalation.escalated, contrarianCheck: escalation.contrarianCheck };
|
|
7694
|
+
}
|
|
7676
7695
|
const finalized = finalizeVotingResult({
|
|
7677
7696
|
input,
|
|
7678
7697
|
strategy,
|
|
@@ -7686,7 +7705,10 @@ async function executeVotingInner(input, logger11, opts) {
|
|
|
7686
7705
|
startTime,
|
|
7687
7706
|
logger: logger11
|
|
7688
7707
|
});
|
|
7689
|
-
return applyContrarianDegrade(
|
|
7708
|
+
return applyContrarianDegrade(
|
|
7709
|
+
{ ...finalized, contrarianCheck: escalation.contrarianCheck },
|
|
7710
|
+
escalation.degradeReason
|
|
7711
|
+
);
|
|
7690
7712
|
}
|
|
7691
7713
|
function applyContrarianDegrade(result, degradeReason) {
|
|
7692
7714
|
if (degradeReason === void 0 || result.policyReason !== void 0) return result;
|
|
@@ -7929,6 +7951,10 @@ var CONSENSUS_VOTE_OUTPUT_SCHEMA = {
|
|
|
7929
7951
|
/** #6094: seats that could not read the artifact; always present. */
|
|
7930
7952
|
unverifiable: z11.number()
|
|
7931
7953
|
}).optional(),
|
|
7954
|
+
// #6111: the quick-mode contrarian check is not a seat, so `voteCounts.error`
|
|
7955
|
+
// cannot count it. Present on every completed vote (`skipped` when it did not
|
|
7956
|
+
// run); optional here only because the async envelope shares this schema.
|
|
7957
|
+
contrarianCheck: ContrarianCheckStatusSchema.optional(),
|
|
7932
7958
|
votes: z11.array(
|
|
7933
7959
|
z11.object({
|
|
7934
7960
|
role: z11.string().max(100),
|
|
@@ -8126,4 +8152,4 @@ export {
|
|
|
8126
8152
|
CONSENSUS_VOTE_TOOL_SCHEMA,
|
|
8127
8153
|
registerConsensusVoteTool
|
|
8128
8154
|
};
|
|
8129
|
-
//# sourceMappingURL=chunk-
|
|
8155
|
+
//# sourceMappingURL=chunk-6UXL574Z.js.map
|